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: -=-=-=-=- computePath path := self athensCanvas createPath: [ :builder | builder absolute; 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: athensCanvas athensCanvas pathTransform restoreAfter: [ athensCanvas pathTransform scaleBy: rectangle extent asFloatPoint athensCanvas setPaint: 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: ![]() Is there better way to draw it? Thank you, Jura |
- [Pharo-users] Athens and ellipse drawing Juraj Kubelka
- Re: [Pharo-users] Athens and ellipse drawing Igor Stasenko
- Re: [Pharo-users] Athens and ellipse drawing Juraj Kubelka
- Re: [Pharo-users] Athens and ellipse drawing Igor Stasenko
- Re: [Pharo-users] Athens and ellipse drawin... Juraj Kubelka
- Re: [Pharo-users] Athens and ellipse drawin... Juraj Kubelka
- Re: [Pharo-users] Athens and ellipse d... Pharo4Stef
- Re: [Pharo-users] Athens and ellip... Juraj Kubelka
- Re: [Pharo-users] Athens and e... Juraj Kubelka
- Re: [Pharo-users] Athens and e... Igor Stasenko
- Re: [Pharo-users] Athens and e... Igor Stasenko