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

Method run

test/cairoTest/cairoTest.cpp:178–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176// dash
177struct TestDash : public TestBase {
178 virtual void run( fli::cairo::Context &ctx ) {
179 double dashes[] = {50.0, /* ink */ 10.0, /* skip */ 10.0, /* ink */ 10.0 /* skip*/ };
180 int ndash = sizeof( dashes ) / sizeof( dashes[0] );
181 double offset = -50.0;
182
183 ctx.setDash( dashes, ndash, offset );
184 ctx.setLineWidth( 10.0 );
185
186 ctx.moveTo( 128.0, 25.6 );
187 ctx.lineTo( 230.4, 230.4 );
188 ctx.relLineTo( -102.4, 0.0 );
189 ctx.curveTo( 51.2, 230.4, 51.2, 128.0, 128.0, 128.0 );
190
191 ctx.stroke();
192 }
193};
194
195// fill and stroke

Callers

nothing calls this directly

Calls 7

setDashMethod · 0.80
setLineWidthMethod · 0.80
relLineToMethod · 0.80
strokeMethod · 0.80
moveToMethod · 0.45
lineToMethod · 0.45
curveToMethod · 0.45

Tested by

no test coverage detected