Login  Register

Re: Roassal2 Composite Shape

Posted by abergel on Jul 12, 2014; 11:18pm
URL: https://forum.world.st/Roassal2-Composite-Shape-tp4767578p4767617.html

Hi Peter,

I am not sure what you try to do. Having two ellipses with the same center? But different radius?

Something like that maybe:
-=-=-=-=-=-=-=-=-=
| v |
v := RTView new.
v @ RTDraggableView. 

shape := RTMultiCompositeShape new.
shape add: (RTEllipse new color: (Color yellow alpha: 0.3); size: [:c | c numberOfMethods sqrt * 10 ]).
shape add: (RTEllipse new color: (Color green alpha: 0.3); size: [:c | c numberOfLinesOfCode sqrt  * 10 ]).

v addAll: (shape elementsOn: RTShape withAllSubclasses).
RTFlowLayout on: v elements.

-=-=-=-=-=-=-=-=-=


Alexandre


On Jul 11, 2014, at 11:05 PM, Peter Uhnák <[hidden email]> wrote:

Hi

I'm trying to draw an ellipse inside another ellipse but to no avail. I've tried using RTCompositeShape but that just expands the size of the smaller shape. Is there something else I'm missing (like fixing dimensions so they won't get updated) or should I subclass RTAbstractCompositeShape and try to make something on my own?

Thanks,
Peter

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