| 53 | // Arc Negative |
| 54 | struct 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 |
nothing calls this directly
no test coverage detected