Revision b379d2d7
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/helpers/FactorySticker.java | ||
---|---|---|
177 | 177 |
|
178 | 178 |
canvas.drawArc( left+o1x-r1, top+o1y-r1, left+o1x+r1, top+o1y+r1, startA, sweepA, false, paint); |
179 | 179 |
|
180 |
float r3 = r*TEXTURE_HEIGHT + stroke/2; |
|
181 |
findCircleIntersection(o1x,o1y,r1-r3,o2x,o2y,r2-r3,cX,cY); |
|
180 |
float r3 = r*TEXTURE_HEIGHT + stroke/2; |
|
181 |
float R1 = r1 + (pA < 0 ? r3:-r3); |
|
182 |
float R2 = r2 + (cA < 0 ? r3:-r3); |
|
183 |
findCircleIntersection(o1x,o1y,R1,o2x,o2y,R2,cX,cY); |
|
182 | 184 |
float o3x = mOX; |
183 | 185 |
float o3y = mOY; |
184 | 186 |
|
185 |
dx = o1x-o3x; |
|
186 |
dy = o1y-o3y; |
|
187 |
dx = pA<0 ? o3x-o1x : o1x-o3x;
|
|
188 |
dy = pA<0 ? o3y-o1y : o1y-o3y;
|
|
187 | 189 |
startA = computeAngle(dy,dx); |
188 |
dx = o2x-o3x; |
|
189 |
dy = o2y-o3y; |
|
190 |
dx = cA<0 ? o3x-o2x : o2x-o3x;
|
|
191 |
dy = cA<0 ? o3y-o2y : o2y-o3y;
|
|
190 | 192 |
float endA = computeAngle(dy,dx); |
191 | 193 |
|
192 | 194 |
sweepA = endA-startA; |
Also available in: Unified diff
New sticker mechanism: improvements for concave stickers.