| 23 | {} |
| 24 | |
| 25 | void makePath( cairo::Context &ctx ) const |
| 26 | { |
| 27 | for( int petal = 0; petal < mNumPetals; ++petal ) { |
| 28 | ctx.newSubPath(); |
| 29 | float petalAngle = ( petal / (float)mNumPetals ) * 2 * M_PI; |
| 30 | vec2 outsideCircleCenter = mLoc + vec2( 1, 0 ) * (float)cos( petalAngle ) * mRadius + vec2( 0, 1 ) * (float)sin( petalAngle ) * mRadius; |
| 31 | vec2 insideCircleCenter = mLoc + vec2( 1, 0 ) * (float)cos( petalAngle ) * mPetalInsideRadius + vec2( 0, 1 ) * (float)sin( petalAngle ) * mPetalInsideRadius; |
| 32 | ctx.arc( outsideCircleCenter, mPetalOutsideRadius, petalAngle + M_PI / 2 + M_PI, petalAngle + M_PI / 2 ); |
| 33 | ctx.arc( insideCircleCenter, mPetalInsideRadius, petalAngle + M_PI / 2, petalAngle + M_PI / 2 + M_PI ); |
| 34 | ctx.closePath(); |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | void draw( cairo::Context &ctx ) const |
| 39 | { |
nothing calls this directly
no test coverage detected