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 <juraj.kube...@gmail.com>
wrote:

> 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 open
> -=-=-=-
>
> Cheers,
> Juraj
>
> On Sep 12, 2014, at 6:53 PM, kilon alios <kilon.al...@gmail.com> wrote:
>
> 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 <juraj.kube...@gmail.com>
> wrote:
>
>> 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
>> addAll: elements;
>> add: edge.
>> RTGridLayout on: elements.
>> elements @ RTDraggable.
>> ^ v open
>> -=-=-
>>
>> Cheers,
>> Juraj
>>
>> On Sep 12, 2014, at 6:30 PM, kilon alios <kilon.al...@gmail.com> wrote:
>>
>> 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 <juraj.kube...@gmail.com>
>> wrote:
>>
>>> 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 := RTView new.
>>> elements := (RTEllipse new size: #yourself; color: Color red) + RTLabel
>>> elementsOn: models.
>>> v addAll: elements.
>>> RTEdge buildEdgesFromObjects: models from: #yourself to: [ :i | i // 2 ]
>>> inView: v.
>>> RTGridLayout on: elements.
>>> elements @ RTDraggable.
>>> v @ RTDraggableView.
>>> v canvas color: Color black.
>>> v open.
>>> -=-=-
>>>
>>> Cheers,
>>> Juraj
>>>
>>> On Sep 12, 2014, at 5:03 PM, kilon alios <kilon.al...@gmail.com> wrote:
>>>
>>> > 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 := line element.v add: es2.
>>> > es @ RTDraggable.
>>> > v @ RTDraggableView .
>>> > v open.
>>> >
>>> > I am getting an error
>>> >
>>> > MNU Array >> element
>>> >
>>> > why ?
>>> >
>>>
>>>
>>>
>>
>>
>
>

Reply via email to