| 218 | // fill style |
| 219 | struct TestFillStyle : public TestBase { |
| 220 | virtual void run( fli::cairo::Context &ctx ) { |
| 221 | ctx.setLineWidth( 6 ); |
| 222 | |
| 223 | ctx.rectangle( 12, 12, 232, 70 ); |
| 224 | ctx.newSubPath(); |
| 225 | ctx.arc( 64, 64, 40, 0, 2 * M_PI ); |
| 226 | ctx.newSubPath(); |
| 227 | ctx.arcNegative( 192, 64, 40, 0, -2 * M_PI ); |
| 228 | |
| 229 | ctx.setFillRule( fli::cairo::FILL_RULE_EVEN_ODD ); |
| 230 | ctx.setSourceRgb( 0, 0.7, 0 ); |
| 231 | ctx.fillPreserve(); |
| 232 | ctx.setSourceRgb( 0, 0, 0 ); |
| 233 | ctx.stroke(); |
| 234 | |
| 235 | ctx.translate( 0, 128 ); |
| 236 | ctx.rectangle( 12, 12, 232, 70 ); |
| 237 | ctx.newSubPath(); |
| 238 | ctx.arc( 64, 64, 40, 0, 2 * M_PI ); |
| 239 | ctx.newSubPath(); |
| 240 | ctx.arcNegative( 192, 64, 40, 0, -2 * M_PI ); |
| 241 | |
| 242 | ctx.setFillRule( fli::cairo::FILL_RULE_WINDING ); |
| 243 | ctx.setSourceRgb( 0, 0, 0.9); |
| 244 | ctx.fillPreserve(); |
| 245 | ctx.setSourceRgb( 0, 0, 0); |
| 246 | ctx.stroke(); |
| 247 | } |
| 248 | }; |
| 249 | |
| 250 | // gradient |
nothing calls this directly
no test coverage detected