Hi Alex! I made a simple code in sunburst: .=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.= | node view| view := ROView new. node := ROElement on:'Hello world'. node + ROLabel. node addShape: ((ROArc startAngle: 0 endAngle: 360) fillColor: Color lightGray); @RODraggable. view add: node. node translateBy: 100 @ 100. view open. .=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.= [image: Imágenes integradas 2] Cheers, Milton 2013/11/17 Alexandre Bergel <alexandre.bergel@me.com>
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. I have found example on the web (e.g., https://developer.gnome.org/gtkmm-tutorial/3.2/sec-cairo-drawing-arcs.html.e... ) 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.