Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread Juraj Kubelka
Yes, you can use SVG path as a shape for an element. What you chose really depends on your objective. If you want to draw nodes (elements) and connect them with edges (lines), I guess, the preferred API is Roassal2. On Sep 12, 2014, at 7:02 PM, kilon alios wrote: > ah thank you very much, that

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
ah thank you very much, thats exactly what I was looking for. I will study Trachel too. I also found that I can do something similar using a SVG path with Roassal. On Sat, Sep 13, 2014 at 12:58 AM, Juraj Kubelka wrote: > I think the intention of Roassal lines is to be connected with elements. >

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
ah thank you very much, thats exactly what I was looking for. I will study Trachel too. I also found that I can do something similar using a SVG path with Roassal. On Sat, Sep 13, 2014 at 12:58 AM, Juraj Kubelka wrote: > I think the intention of Roassal lines is to be connected with elements. >

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread Juraj Kubelka
I think the intention of Roassal lines is to be connected with elements. If you want only draw lines without any connection to elements, use directly Trachel. I guess -=-=-=- | v line | v := RTView new. line := TRLineShape new from: 0@0 to: 100@100 color: Color blue. v canvas addShape: line. ^ v

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
well thats not an one liner and you still connect elements with it. I just wanted to pass coordinates to a line and draw it. So I would prefer it if I could pass points instead of elements. On Sat, Sep 13, 2014 at 12:38 AM, Juraj Kubelka wrote: > OK, then you can write: > > -=-=-=- > | v element

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread Juraj Kubelka
OK, then you can write: -=-=-=- | v elements edge | v := RTView new. elements := (RTEllipse new size: #yourself; color: Color red) + RTLabel elementsOn: #(10 20). edge := RTDirectedLine new color: Color blue; edgeFrom: elements first to: elements second. v a

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
yes i know about the example of a line connecting with other shapes. I wanted just a simple line by itself starting from one point and ending to another in a single line of code. On Sat, Sep 13, 2014 at 12:26 AM, Juraj Kubelka wrote: > I have checked RTDirectedLine and it is not supposed to use

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread Juraj Kubelka
I have checked RTDirectedLine and it is not supposed to use the way you want. Basically RTEdge is the object you want to manipulate with. I do not know what is the objective of your example. But there is way how you could write it. -=-=- | v elements models | models := (10 to: 60 by: 1). v :=

Re: [Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
to answer myself, view color changes via canvas so it is v canvas color: Color black. I also found a way to create an edge looking at the tests. this is the complete code now v := RTView new. shape := RTEllipse new size: 20; color: Color red. shape := shape + RTLabel. es := shape elementOn:'hel

[Pharo-dev] Starting with Roassal 2

2014-09-12 Thread kilon alios
Ok here comes the first question how I change the background color of RTView ? also when I do this v := RTView new. shape := RTEllipse new size: 20; color: Color red. shape := shape + RTLabel. es := shape elementOn:'hello'. v add: es. line := RTDirectedLine new pointsFrom: 20@20 To: 30@30. es2