Hi
I've improved ROArc class so that we can now change the angle
between made by the center of the circle and the borders of the edge.
An angle of 0 will return a simple ROLine, and if the angle is bigger
than 2pi, it will use an angle like alpha % 2pi. The angle is given in
rad.
layout:= ROVerticalCompactTree new.
view shape circle size: 15
.
view nodes: ( ROLayout withAllSubclasses ).
view edgesFrom:
#superclass.
layout userDefinedEdges: view edges.
view layout:
layout.
layout verticalGap: 70; horizontalGap: 30.
view applyLayout.
view nodes do: [ :f | (layout childrenFor: f) do: [ :t | (t model
inheritsFrom: f model) ifTrue: [ t model methodDict keysDo: [ :k | (f
model methodDict includesKey: k) ifTrue: [ view edgeFromAssociation: f
model ->t model ] ] ] ] ].
view edges do: [ :e | e - ROLine + (ROArc
new color: (Color r: 0 g: 1 b: 0.5 ); width: 2; angle: 2) ].
layout
userDefinedEdges do: [ :e | e - ROArc + ((ROLine arrowed) color: (Color
r: 1 g: 0 b: 0 ); width: 2 )"; attachPoint: ROCenteredAttachPoint
instance)" ].
Maybe you will see something weird.
Well I don't
understand why, but the first time it draws the ROArc, if the mouse is
not on the canva, there are strange thing until you move the mouse on an
edge...
You can see the same phenomenon when dragging an edge and
making its abscissa bigger and smaller than its father's one.
If you
understand what appends please tell me.
Regards
Mathieu
Show replies by date