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

Method run

test/cairoTest/cairoTest.cpp:84–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82// clip
83struct TestClip : public TestBase {
84 virtual void run( fli::cairo::Context &ctx ) {
85 ctx.setSourceRgb( 0, 0, 0 );
86 ctx.arc( 128.0, 128.0, 76.8, 0, 2 * M_PI );
87 ctx.clip();
88
89 ctx.newPath(); // current path is not consumed by ctx.clip()
90 ctx.rectangle( 0, 0, 256, 256 );
91 ctx.fill();
92 ctx.setSourceRgb( 0, 1, 0 );
93 ctx.moveTo( 0, 0 );
94 ctx.lineTo( 256, 256 );
95 ctx.moveTo( 256, 0 );
96 ctx.lineTo( 0, 256 );
97 ctx.setLineWidth( 10.0 );
98 ctx.stroke();
99 }
100};
101
102// clip image

Callers

nothing calls this directly

Calls 10

setSourceRgbMethod · 0.80
clipMethod · 0.80
newPathMethod · 0.80
setLineWidthMethod · 0.80
strokeMethod · 0.80
arcMethod · 0.45
rectangleMethod · 0.45
fillMethod · 0.45
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected