| 329 | // set line cap |
| 330 | struct 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 |
nothing calls this directly
no test coverage detected