{.offset=1.0, .r=0, .g=0, .b=255, .a=255}\r
};\r
\r
+\r
Tvg_Paint *shape1 = tvg_shape_new();\r
tvg_shape_append_rect(shape1, 500, 500, 100, 100, 30, 30);\r
Tvg_Gradient* grad1 = tvg_radial_gradient_new();\r
{.offset=1.0, .r=0, .g=255, .b=255, .a=255}\r
};\r
\r
+ Tvg_Paint *shape2 = tvg_shape_new();\r
+ tvg_shape_append_rect(shape2, 400, 0, 800, 400, 20, 20);\r
+ Tvg_Gradient* grad2 = tvg_linear_gradient_new();\r
+ tvg_linear_gradient_set(grad2, 400, 0, 450, 50);\r
+ Tvg_Color_Stop color_stops2[2] =\r
+ {\r
+ {.offset=0.0, .r=0, .g=0, .b=0, .a=255},\r
+ {.offset=1, .r=255, .g=0, .b=0, .a=255},\r
+ };\r
+\r
+ tvg_gradient_spread(grad2, TVG_STROKE_FILL_REPEAT);\r
+\r
+ Tvg_Paint* shape3 = tvg_shape_new();\r
+ tvg_shape_append_rect(shape3, 0, 400, 400, 800, 20, 20);\r
+ Tvg_Gradient* grad3 = tvg_linear_gradient_new();\r
+ tvg_linear_gradient_set(grad3, 0, 400, 50, 450);\r
+ Tvg_Color_Stop color_stops3[2] =\r
+ {\r
+ {.offset=0.0, .r=0, .g=0, .b=0, .a=255},\r
+ {.offset=1, .r=0, .g=255, .b=0, .a=255},\r
+ };\r
+\r
+ tvg_gradient_spread(grad3, TVG_STROKE_FILL_REFLECT);\r
+\r
tvg_gradient_color_stops(grad, color_stops, 4);\r
tvg_gradient_color_stops(grad1, color_stops1, 3);\r
+ tvg_gradient_color_stops(grad2, color_stops2, 2);\r
+ tvg_gradient_color_stops(grad3, color_stops3, 2);\r
tvg_shape_linear_gradient_set(shape, grad);\r
tvg_shape_radial_gradient_set(shape1, grad1);\r
+ tvg_shape_linear_gradient_set(shape2, grad2);\r
+ tvg_shape_linear_gradient_set(shape3, grad3);\r
\r
tvg_canvas_push(canvas, shape);\r
tvg_canvas_push(canvas, shape1);\r
+ tvg_canvas_push(canvas, shape2);\r
+ tvg_canvas_push(canvas, shape3);\r
+\r
+ Tvg_Paint* shape4 = tvg_shape_new();\r
+ tvg_shape_append_rect(shape4, 700, 700, 100, 100, 20, 20);\r
+ Tvg_Gradient* grad4 = tvg_linear_gradient_new();\r
+ tvg_linear_gradient_set(grad4, 700, 700, 800, 800);\r
+ Tvg_Color_Stop color_stops4[2] =\r
+ {\r
+ {.offset=0.0, .r=0, .g=0, .b=0, .a=255},\r
+ {.offset=1, .r=0, .g=255, .b=0, .a=255},\r
+ };\r
+ tvg_gradient_color_stops(grad4, color_stops4, 2);\r
+ tvg_shape_linear_gradient_set(shape4, grad4);\r
+\r
+ Tvg_Gradient* grad5 = tvg_linear_gradient_new();\r
+ tvg_linear_gradient_set(grad5, 700, 700, 800, 800);\r
+ Tvg_Color_Stop color_stops5[2] =\r
+ {\r
+ {.offset=0.0, .r=0, .g=0, .b=255, .a=255},\r
+ {.offset=1, .r=0, .g=255, .b=255, .a=255},\r
+ };\r
+ tvg_gradient_color_stops(grad5, color_stops5, 2);\r
+ tvg_shape_linear_gradient_set(shape4, grad5);\r
+\r
+ tvg_canvas_push(canvas, shape4);\r
\r
tvg_canvas_draw(canvas);\r
tvg_canvas_sync(canvas);\r