| 2076 | } |
| 2077 | |
| 2078 | void example_star( canvas &that, float width, float height ) |
| 2079 | { |
| 2080 | that.scale( width / 256.0f, height / 256.0f ); |
| 2081 | that.move_to( 128.0f, 28.0f ); |
| 2082 | that.line_to( 157.0f, 87.0f ); |
| 2083 | that.line_to( 223.0f, 97.0f ); |
| 2084 | that.line_to( 175.0f, 143.0f ); |
| 2085 | that.line_to( 186.0f, 208.0f ); |
| 2086 | that.line_to( 128.0f, 178.0f ); |
| 2087 | that.line_to( 69.0f, 208.0f ); |
| 2088 | that.line_to( 80.0f, 143.0f ); |
| 2089 | that.line_to( 32.0f, 97.0f ); |
| 2090 | that.line_to( 98.0f, 87.0f ); |
| 2091 | that.close_path(); |
| 2092 | that.set_shadow_blur( 8.0f ); |
| 2093 | that.shadow_offset_y = 4.0f; |
| 2094 | that.set_shadow_color( 0.0f, 0.0f, 0.0f, 0.5f ); |
| 2095 | that.set_color( fill_style, 1.0f, 0.9f, 0.2f, 1.0f ); |
| 2096 | that.fill(); |
| 2097 | that.line_join = rounded; |
| 2098 | that.set_line_width( 12.0f ); |
| 2099 | that.set_color( stroke_style, 0.9f, 0.0f, 0.5f, 1.0f ); |
| 2100 | that.stroke(); |
| 2101 | float segments[] = { 21.0f, 9.0f, 1.0f, 9.0f, 7.0f, 9.0f, 1.0f, 9.0f }; |
| 2102 | that.set_line_dash( segments, 8 ); |
| 2103 | that.line_dash_offset = 10.0f; |
| 2104 | that.line_cap = circle; |
| 2105 | that.set_line_width( 6.0f ); |
| 2106 | that.set_color( stroke_style, 0.95f, 0.65f, 0.15f, 1.0f ); |
| 2107 | that.stroke(); |
| 2108 | that.set_shadow_color( 0.0f, 0.0f, 0.0f, 0.0f ); |
| 2109 | that.set_linear_gradient( fill_style, 64.0f, 0.0f, 192.0f, 256.0f ); |
| 2110 | that.add_color_stop( fill_style, 0.30f, 1.0f, 1.0f, 1.0f, 0.0f ); |
| 2111 | that.add_color_stop( fill_style, 0.35f, 1.0f, 1.0f, 1.0f, 0.8f ); |
| 2112 | that.add_color_stop( fill_style, 0.45f, 1.0f, 1.0f, 1.0f, 0.8f ); |
| 2113 | that.add_color_stop( fill_style, 0.50f, 1.0f, 1.0f, 1.0f, 0.0f ); |
| 2114 | that.global_composite_operation = source_atop; |
| 2115 | that.fill_rectangle( 0.0f, 0.0f, 256.0f, 256.0f ); |
| 2116 | } |
| 2117 | |
| 2118 | void example_neon( canvas &that, float width, float height ) |
| 2119 | { |
nothing calls this directly
no test coverage detected