Hi!

In Roassal, I have the following to draw an ellipse:

-=-=-=-=-=-=-=-=-=-=
fillOval: aRectangle color: aColor borderWidth: aBorderWidth borderColor: aBorderColor

|p rect stroke |

rect := self virtualToRealRectangle: aRectangle.

nativeCanvas pathTransform restoreAfter: [
p:= nativeCanvas createPath: [:path | 
|halfPi |
halfPi := Float pi /2.
path 
absolute;
moveTo: rect topCenter;
cwArcTo: rect rightCenter angle: halfPi;
cwArcTo: rect bottomCenter angle: halfPi;
cwArcTo: rect leftCenter angle: halfPi;
cwArcTo: rect topCenter angle: halfPi].
nativeCanvas setShape: p.
nativeCanvas setPaint: aColor.
nativeCanvas draw.
stroke := nativeCanvas setStrokePaint: aBorderColor.
stroke width: aBorderWidth.
nativeCanvas draw
]
-=-=-=-=-=-=-=-=-=-=
I feel this is not quite right.

It produces something like:

With the following Roassal script:

-=-=-=-=-=-=-=-=-=-=
| view el |
view := ROView new.
el := ROElement on: 'hello world'.
el + ROLabel + ROEllipse.
el @ RODraggable.
view add: el.
view open
-=-=-=-=-=-=-=-=-=-=


It is has if the halfPi variable does not have the right value. 
However I was not able to map them in Athens.

Help appreciated. This is a bug in Roassal that has been there for too long :-)

Cheers,
Alexandre

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



Reply via email to