MCPcopy Create free account
hub / github.com/cinder/Cinder / run

Method run

test/cairoTest/cairoTest.cpp:220–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218// fill style
219struct 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

Callers

nothing calls this directly

Calls 10

setLineWidthMethod · 0.80
newSubPathMethod · 0.80
setFillRuleMethod · 0.80
setSourceRgbMethod · 0.80
fillPreserveMethod · 0.80
strokeMethod · 0.80
rectangleMethod · 0.45
arcMethod · 0.45
arcNegativeMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected