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

Method run

test/cairoTest/cairoTest.cpp:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53// Arc Negative
54struct TestArcNegative : public TestBase {
55 virtual void run( fli::cairo::Context &ctx ) {
56 double xc = 128.0;
57 double yc = 128.0;
58 double radius = 100.0;
59 double angle1 = 45.0 * ( M_PI / 180.0 ); /* angles are specified */
60 double angle2 = 180.0 * ( M_PI / 180.0 ); /* in radians */
61
62 ctx.setSourceRgb( 0.0, 0.0, 0.0 );
63 ctx.setLineWidth( 10.0 );
64 ctx.arcNegative( xc, yc, radius, angle1, angle2 );
65 ctx.stroke();
66
67 /* draw helping lines */
68 ctx.setSourceRgba( 1, 0.2, 0.2, 0.6 );
69 ctx.setLineWidth( 6.0 );
70
71 ctx.arc( xc, yc, 10.0, 0, 2*M_PI );
72 ctx.fill();
73
74 ctx.arc( xc, yc, radius, angle1, angle1 );
75 ctx.lineTo( xc, yc);
76 ctx.arc( xc, yc, radius, angle2, angle2 );
77 ctx.lineTo( xc, yc );
78 ctx.stroke();
79 }
80};
81
82// clip

Callers

nothing calls this directly

Calls 8

setSourceRgbMethod · 0.80
setLineWidthMethod · 0.80
strokeMethod · 0.80
setSourceRgbaMethod · 0.80
arcNegativeMethod · 0.45
arcMethod · 0.45
fillMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected