8 static uint32_t buffer[WIDTH * HEIGHT];
10 int main(int argc, char **argv)
12 //Initialize TizenVG Engine
16 auto canvas = tvg::SwCanvas::gen(buffer, WIDTH, HEIGHT);
19 auto scene = tvg::Scene::gen();
20 scene->reserve(3); //reserve 3 shape nodes (optional)
23 auto shape1 = tvg::Shape::gen();
24 shape1->rect(0, 0, 400, 400, 0.1);
25 shape1->fill(255, 0, 0, 255);
26 shape1->rotate(0, 0, 45); //axis x, y, z
27 scene->push(move(shape1));
30 auto shape2 = tvg::Shape::gen();
31 shape2->rect(0, 0, 400, 400, 0.1);
32 shape2->fill(0, 255, 0, 255);
33 shape2->transform(matrix); //by matrix (var matrix[4 * 4];)
34 scene->push(move(shape2));
37 auto shape3 = tvg::Shape::gen();
38 shape3->rect(0, 0, 400, 400, 0.1);
39 shape3->fill(0, 0, 255, 255);
40 shape3->origin(100, 100); //offset
41 scene->push(move(shape3));
43 //Draw the Scene onto the Canvas
44 canvas->push(move(scene));
48 //Terminate TizenVG Engine