instead you can first, draw a filled ellipse (blue) and then draw green one over it.of non-uniform scaling (x/y).yes, you using stroke for 2nd ellipse,but stroke width is also subject of scaling, that's why it has different width, because
On 11 April 2014 21:33, Juraj Kubelka <juraj.kubelka@gmail.com> wrote:
Hi Igor, hi all!I am not sure how to properly draw ellipse. Right now I draw a path like this:The path is created that way:-=-=-=-=-computePathpath := self athensCanvascreatePath: [ :builder |builderabsolute;moveTo: 0 @ 0.5;ccwArcTo: 0.5 @ 0.0 angle: 90 degreesToRadians;ccwArcTo: 0.0 @ -0.5 angle: 90 degreesToRadians;ccwArcTo: -0.5 @ 0.0 angle: 90 degreesToRadians;ccwArcTo: 0 @ 0.5 angle: 90 degreesToRadians ]-=-=-=-=-And draw it like this:-=-=-=-=-drawOn: athensCanvasathensCanvas pathTransformrestoreAfter: [athensCanvas pathTransformscaleBy: rectangle extent asFloatPointathensCanvassetPaint: color;drawShape: self path.(athensCanvas setStrokePaint: strokePaint)width: (self strokeWidth / self scale) asFloat.athensCanvas drawShape: self path ]-=-=-=-=-But with a different shapes, the border does not have same width all around the ellipse. See the image:<Captura de pantalla 2014-04-11 a la(s) 16.29.13.png>Is there better way to draw it?Thank you,Jura
--
Best regards,
Igor Stasenko.