Hi Alex! I took a brief look at it and will play with it more tomorrow but it looks great! Especially the RTMultiLine>>block: message makes it is much more flexible for weird use cases (e.g. wanting to have control points while maintaining orthogonality etc). Perhaps we don't even need to add extra option for control points per se and just let it be handled from outside? E.g. something like --------------------------------- v := RTView new.
e1 := (RTEllipse new size: 30) elementOn: 'A'. e2 := (RTEllipse new size: 30) elementOn: 'B'. ctrlShape := RTEllipse new size: 10; color: (Color purple alpha: 0.3). ctrls := (ctrlShape elementsOn: (1 to: 2)). v add: e1; add: e2; addAll: ctrls. v elements @ RTDraggable. e := RTEdge from: e1 to: e2. ctrls do: [ :el | el addConnectedEdge: e ]. shape := RTMultiLine new color: Color blue. shape block: [ :fromPoint :toPoint | | points | points := ctrls collect: [ :el | el position ]. points addFirst: fromPoint; addLast: toPoint. points asArray. ]. e + shape. v add: e. RTCircleLayout on: v elements. v open. ------------------------- Thanks! Peter p.s. should I be CC-ing to moose-dev list? not sure what the proper mailing policy is On Wed, Jul 30, 2014 at 8:12 PM, Alexandre Bergel <alexandre.ber...@me.com> wrote: > Hi Peter! > > I’ve just added the orthogonal vertical and horizontal lines in Roassal2. > Here are some screenshots. > > > These last script has been made with: > -=-=-=-=-=-=-=-=-=-=-=-= > | v | > v := RTView new. > > v addAll: ((RTEllipse new size: 20; color: (Color red alpha: 0.3)) > elementsOn: (1 to: 20)). > > shape := RTMultiLine new. > shape orthoVertical. > shape color: (Color blue alpha: 0.3). > > RTEdge > buildEdgesFromObjects: (1 to: 20) from: [ :n | n // 3 ] to: #yourself > using: shape inView: v. > > v elements @ RTDraggable @ RTPopup. > RTTreeLayout on: v elements. > v open > -=-=-=-=-=-=-=-=-=-=-=-= > > Cheers, > Alexandre > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > On Jul 26, 2014, at 3:57 PM, Peter Uhnák <i.uh...@gmail.com> wrote: > > Hi, > > is there any support for orthogonal lines in Roassal2? I've seen something > similar (ROOrthoVerticalLineShape), however nothing of that sort in > Roassal2. I would imagine it to behave similarly to RTBezierLine - having > controllingElements to specify the corners. (While ROOrtholines did it > automatically I was looking for something more manual, so it can go in both > directions - thus the controllingElements). > > Second thing I wasn't able to figure out is whether it is possible to > create line from element to itself. All *AttachPoint classes aren't really > able to cope with that. The best result I got was from Vertical/Horizontal > AttachPoints (combined with BezierLine), however I would like to be able to > specify which side it would start on and end on. Ideally not just middle of > sides, but arbitrary part of the shape (I imagine that might be hard for > non-rectangular shapes). > > Thanks, > Peter > > >