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

Method run

test/cairoTest/cairoTest.cpp:331–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329// set line cap
330struct TestSetLineCap : public TestBase {
331 virtual void run( fli::cairo::Context &ctx ) {
332 ctx.setLineWidth( 30.0 );
333 ctx.setLineCap( fli::cairo::LINE_CAP_BUTT ); /* default */
334 ctx.moveTo( 64.0, 50.0 );
335 ctx.lineTo( 64.0, 200.0 );
336 ctx.stroke();
337 ctx.setLineCap( fli::cairo::LINE_CAP_ROUND );
338 ctx.moveTo( 128.0, 50.0 );
339 ctx.lineTo( 128.0, 200.0 );
340 ctx.stroke();
341 ctx.setLineCap( fli::cairo::LINE_CAP_SQUARE );
342 ctx.moveTo( 192.0, 50.0 );
343 ctx.lineTo( 192.0, 200.0 );
344 ctx.stroke();
345
346 /* draw helping lines */
347 ctx.setSourceRgb( 1, 0.2, 0.2 );
348 ctx.setLineWidth( 2.56 );
349 ctx.moveTo( 64.0, 50.0 );
350 ctx.lineTo( 64.0, 200.0 );
351 ctx.moveTo( 128.0, 50.0 );
352 ctx.lineTo( 128.0, 200.0 );
353 ctx.moveTo( 192.0, 50.0 );
354 ctx.lineTo( 192.0, 200.0 );
355 ctx.stroke();
356 }
357};
358
359// set line join

Callers

nothing calls this directly

Calls 6

setLineWidthMethod · 0.80
setLineCapMethod · 0.80
strokeMethod · 0.80
setSourceRgbMethod · 0.80
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected