| 176 | // dash |
| 177 | struct 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 |