Roassal: two arrow questions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal: two arrow questions

jfabry
Hi all,

I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.


First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

rjacas
Hi Johan, 

For your first question, you could change the attachPoint of the Lines, which will automatically change the arrow to appear on the border.

As for the "arched lines", there is a class called RTDirectedLine which does just that.

If you could provide a mockup code on what are you trying to do, I could help you further.

Regards,
Ricardo 


2014-04-25 9:10 GMT-03:00 Johan Fabry <[hidden email]>:
Hi all,

I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.


First question: how can I make the arrows go to the border of the ellipse, instead of the center?
Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
lets reign all together

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
In reply to this post by jfabry
Hi Johan,

First question: how can I make the arrows go to the border of the ellipse, instead of the center?

Attachpoint is your friend.

-=-=-=-=-=-=-=-=-=
| v e1 e2 l shape |
v := RTView new.

e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.

e1 @ RTDraggable.
e2 @ RTDraggable.

e2 translateTo: 60 @ 40.

shape := RTLine new color: Color red.
shape attachPoint: (RTShorterDistanceAttachPoint new).
l := shape edgeFrom: e1 to: e2.

v add: e1; add: e2; add: l.
-=-=-=-=-=-=-=-=-=

Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.

We have no solution for now.
Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
We can work on this, but not right now… You can also give a try if you wish.

Alexandre




---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by rjacas
Hi Ricardo,

thanks for the hints and offer of help. My mockup could would be this:

| view elements e1 e2 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color white))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTLine new color: Color black) + (RTArrow new color: Color black) @ (RTLabelled new text: '12'; view: view).
view add: e1.
e2 := RTEdge from: elements second to: elements first.
e2 + (RTLine new color: Color black) + (RTArrow new color: Color black) @ (RTLabelled new text: '21'; view: view).
view add: e2.
view open

On Apr 25, 2014, at 9:19 AM, Ricardo Jacas <[hidden email]> wrote:

> Hi Johan,
>
> For your first question, you could change the attachPoint of the Lines, which will automatically change the arrow to appear on the border.
>
> As for the "arched lines", there is a class called RTDirectedLine which does just that.
>
> If you could provide a mockup code on what are you trying to do, I could help you further.
>
> Regards,
> Ricardo
>
>
> 2014-04-25 9:10 GMT-03:00 Johan Fabry <[hidden email]>:
> Hi all,
>
> I have the following situation: a node named ‘one’ and a node named ‘two’, I want to draw an arrow ‘onetwo' from one to two, and ‘twoone' from two to one. Nodes are ellipses with size 30, and a label. Arrows are an edge + line + arrow + label construct. So I get the image like below, which raises two2 questions.
>
> <arrows.tiff>
>
> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
>
> --
> lets reign all together
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by abergel

Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?

On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Johan,
>
>> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>
> Attachpoint is your friend.
>
> -=-=-=-=-=-=-=-=-=
> | v e1 e2 l shape |
> v := RTView new.
>
> e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
> e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> e2 translateTo: 60 @ 40.
>
> shape := RTLine new color: Color red.
> shape attachPoint: (RTShorterDistanceAttachPoint new).
> l := shape edgeFrom: e1 to: e2.
>
> v add: e1; add: e2; add: l.
> -=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>
>> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
> We have no solution for now.
> Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
> We can work on this, but not right now… You can also give a try if you wish.
>
> Alexandre
>
>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

rjacas
The solution is a little verbose, but it does what you need :).
Please update Roassal 2, since I just found a bug there.

| view elements e1 e2 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color white))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view).
view add: e1.
e2 := RTEdge from: elements second to: elements first.
e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
view add: e2.
view open.


2014-04-25 9:49 GMT-03:00 Johan Fabry <[hidden email]>:

Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?

On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Johan,
>
>> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>
> Attachpoint is your friend.
>
> -=-=-=-=-=-=-=-=-=
> | v e1 e2 l shape |
> v := RTView new.
>
> e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
> e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> e2 translateTo: 60 @ 40.
>
> shape := RTLine new color: Color red.
> shape attachPoint: (RTShorterDistanceAttachPoint new).
> l := shape edgeFrom: e1 to: e2.
>
> v add: e1; add: e2; add: l.
> -=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>
>> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
> We have no solution for now.
> Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
> We can work on this, but not right now… You can also give a try if you wish.
>
> Alexandre
>
>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
lets reign all together

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
It would be great to have a singleton pattern for the attach point

Alexandre

Le 25-04-2014 à 9:57, Ricardo Jacas <[hidden email]> a écrit :

The solution is a little verbose, but it does what you need :).
Please update Roassal 2, since I just found a bug there.

| view elements e1 e2 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color white))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view).
view add: e1.
e2 := RTEdge from: elements second to: elements first.
e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
view add: e2.
view open.


2014-04-25 9:49 GMT-03:00 Johan Fabry <[hidden email]>:

Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?

On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Johan,
>
>> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>
> Attachpoint is your friend.
>
> -=-=-=-=-=-=-=-=-=
> | v e1 e2 l shape |
> v := RTView new.
>
> e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
> e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> e2 translateTo: 60 @ 40.
>
> shape := RTLine new color: Color red.
> shape attachPoint: (RTShorterDistanceAttachPoint new).
> l := shape edgeFrom: e1 to: e2.
>
> v add: e1; add: e2; add: l.
> -=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>
>> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
> We have no solution for now.
> Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
> We can work on this, but not right now… You can also give a try if you wish.
>
> Alexandre
>
>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
lets reign all together
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by rjacas
The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:


What can be done about this?

On Apr 25, 2014, at 9:57 AM, Ricardo Jacas <[hidden email]> wrote:

The solution is a little verbose, but it does what you need :).
Please update Roassal 2, since I just found a bug there.

| view elements e1 e2 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color white))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view).
view add: e1.
e2 := RTEdge from: elements second to: elements first.
e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
view add: e2.
view open.


2014-04-25 9:49 GMT-03:00 Johan Fabry <[hidden email]>:

Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?

On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Johan,
>
>> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>
> Attachpoint is your friend.
>
> -=-=-=-=-=-=-=-=-=
> | v e1 e2 l shape |
> v := RTView new.
>
> e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
> e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> e2 translateTo: 60 @ 40.
>
> shape := RTLine new color: Color red.
> shape attachPoint: (RTShorterDistanceAttachPoint new).
> l := shape edgeFrom: e1 to: e2.
>
> v add: e1; add: e2; add: l.
> -=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>
>> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
> We have no solution for now.
> Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
> We can work on this, but not right now… You can also give a try if you wish.
>
> Alexandre
>
>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
[hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



-- 
lets reign all together
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by abergel

Yes, that sounds like a good idea!

On Apr 25, 2014, at 10:05 AM, Alexandre Bergel <[hidden email]> wrote:

> It would be great to have a singleton pattern for the attach point
>
> Alexandre



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
In reply to this post by jfabry
What could be done, is to have the label a bit closer to one of the extremities.
I am working on this right now.

Alexandre


On Apr 25, 2014, at 10:08 AM, Johan Fabry <[hidden email]> wrote:

> The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:
>
> <arrows2.tiff>
>
> What can be done about this?
>
> On Apr 25, 2014, at 9:57 AM, Ricardo Jacas <[hidden email]> wrote:
>
>> The solution is a little verbose, but it does what you need :).
>> Please update Roassal 2, since I just found a bug there.
>>
>> | view elements e1 e2 |
>> view := RTView new.
>> elements :=  ((RTEllipse new size: 30; color: Color white))
>>                         elementsOn: #(one two).
>> view addAll: elements.
>> elements @ RTDraggable.
>> RTCircleLayout new initialRadius: 70; on: elements.
>>
>> e1 := RTEdge from: elements first to: elements second.
>> e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view).
>> view add: e1.
>> e2 := RTEdge from: elements second to: elements first.
>> e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
>> view add: e2.
>> view open.
>>
>>
>> 2014-04-25 9:49 GMT-03:00 Johan Fabry <[hidden email]>:
>>
>> Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?
>>
>> On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:
>>
>> > Hi Johan,
>> >
>> >> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>> >
>> > Attachpoint is your friend.
>> >
>> > -=-=-=-=-=-=-=-=-=
>> > | v e1 e2 l shape |
>> > v := RTView new.
>> >
>> > e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
>> > e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>> >
>> > e1 @ RTDraggable.
>> > e2 @ RTDraggable.
>> >
>> > e2 translateTo: 60 @ 40.
>> >
>> > shape := RTLine new color: Color red.
>> > shape attachPoint: (RTShorterDistanceAttachPoint new).
>> > l := shape edgeFrom: e1 to: e2.
>> >
>> > v add: e1; add: e2; add: l.
>> > -=-=-=-=-=-=-=-=-=
>> > <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>> >
>> >> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>> >
>> > We have no solution for now.
>> > Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
>> > We can work on this, but not right now… You can also give a try if you wish.
>> >
>> > Alexandre
>> >
>> >
>> >>
>> >>
>> >> ---> Save our in-boxes! http://emailcharter.org <---
>> >>
>> >> Johan Fabry   -   http://pleiad.cl/~jfabry
>> >> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>> >>
>> >> _______________________________________________
>> >> Moose-dev mailing list
>> >> [hidden email]
>> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>> >
>> > --
>> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> > Alexandre Bergel  http://www.bergel.eu
>> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> >
>> >
>> >
>> > _______________________________________________
>> > Moose-dev mailing list
>> > [hidden email]
>> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>> --
>> lets reign all together
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
In reply to this post by jfabry
I have updated Roassal. Edges are now slightly closer to the ending extremities.
Under the last version of Roassal, your code produces:

Alexandre


On Apr 25, 2014, at 10:08 AM, Johan Fabry <[hidden email]> wrote:

The lines look very cool this way, thanks! But the labels are still an issue :-( It’s clearest in a picture of my original example:

<arrows2.tiff>

What can be done about this?

On Apr 25, 2014, at 9:57 AM, Ricardo Jacas <[hidden email]> wrote:

The solution is a little verbose, but it does what you need :).
Please update Roassal 2, since I just found a bug there.

| view elements e1 e2 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color white))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view).
view add: e1.
e2 := RTEdge from: elements second to: elements first.
e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
view add: e2.
view open.


2014-04-25 9:49 GMT-03:00 Johan Fabry <[hidden email]>:

Thanks Alex. But how about the RTDirectedLine that Ricardo mentioned ?? Will he be able to fix my mockup code with that?

On Apr 25, 2014, at 9:42 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Johan,
>
>> First question: how can I make the arrows go to the border of the ellipse, instead of the center?
>
> Attachpoint is your friend.
>
> -=-=-=-=-=-=-=-=-=
> | v e1 e2 l shape |
> v := RTView new.
>
> e1 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'one'.
> e2 := ((RTEllipse new size: 20) + RTLabel) elementOn: 'two'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> e2 translateTo: 60 @ 40.
>
> shape := RTLine new color: Color red.
> shape attachPoint: (RTShorterDistanceAttachPoint new).
> l := shape edgeFrom: e1 to: e2.
>
> v add: e1; add: e2; add: l.
> -=-=-=-=-=-=-=-=-=
> <Screen Shot 2014-04-25 at 9.39.53 AM.png>
>
>> Second question: as a human I would draw each of the two arrows with a curve: one curving up and one curving down so that they (and their labels) do not overlap. Can I do something like this in Roassal? Because now readability is far from optimal.
>
> We have no solution for now.
> Probably we need a new shape, something like RTDistinctLine that gives a variation when necessary.
> We can work on this, but not right now… You can also give a try if you wish.
>
> Alexandre
>
>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



-- 
lets reign all together
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
(Back online now, I was/am traveling …)
 
Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines). 

Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(


On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:

I have updated Roassal. Edges are now slightly closer to the ending extremities.
Under the last version of Roassal, your code produces:
<Screen Shot 2014-04-25 at 11.24.36 AM.png>

Alexandre





---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry

Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue)  and I do the following **after the view has already been opened** nothing happens:

edge shape color: Color red.
edge update.
view signalUpdate

On Apr 27, 2014, at 7:28 AM, Johan Fabry <[hidden email]> wrote:

> (Back online now, I was/am traveling …)
>  
> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>
> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>
> <123.tiff>
>
> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>
>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>> Under the last version of Roassal, your code produces:
>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>
>> Alexandre
>>
>>
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
In reply to this post by jfabry
Hi!

I have added a #offsetOnEdge: to RTLabelled.
The method takes as argument a float, between 0.0 and 1.0.
1.0 means it is on the starting extremity.
0.0 means it is on the ending extremity.

Here is an example:

-=-=-=-=-=-=-=-=-=-=-=-=
| view elements e1 |
view := RTView new.
elements :=  ((RTEllipse new size: 30; color: Color black))
                        elementsOn: #(one two).
view addAll: elements.
elements @ RTDraggable.
RTCircleLayout new initialRadius: 70; on: elements.

e1 := RTEdge from: elements first to: elements second.
e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view; offsetOnEdge: 0.3).
view add: e1.
"e2 := RTEdge from: elements second to: elements first.
e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
view add: e2."
view open.
-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre


On Apr 27, 2014, at 8:28 AM, Johan Fabry <[hidden email]> wrote:

> (Back online now, I was/am traveling …)
>  
> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>
> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>
> <123.tiff>
>
> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>
>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>> Under the last version of Roassal, your code produces:
>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>
>> Alexandre
>>
>>
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
In reply to this post by jfabry
Strange. It works for me:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v es edges shape |
v := RTView new.
es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
RTCircleLayout new initialRadius: 100; on: es.
v addAll: es.

shape := RTLine new color: Color red.
edges := RTEdge
        buildEdgesFromObjects: (1 to: 20)
        from: [ :value | value // 2 ]
        to: #yourself
        using: shape
        inView: v.

v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].

v open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Else, you can directly change the color of the Trachel shape behind the edge:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v es edges shape |
v := RTView new.
es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
RTCircleLayout new initialRadius: 100; on: es.
v addAll: es.

shape := RTLine new color: Color red.
edges := RTEdge
        buildEdgesFromObjects: (1 to: 20)
        from: [ :value | value // 2 ]
        to: #yourself
        using: shape
        inView: v.

v canvas addMenu: 'change color' callback: [  edges  do: [ :e | e trachelShape color: Color random ]. v signalUpdate ].
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Let me know how it goes...

v open


On Apr 27, 2014, at 5:11 PM, Johan Fabry <[hidden email]> wrote:

>
> Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue)  and I do the following **after the view has already been opened** nothing happens:
>
> edge shape color: Color red.
> edge update.
> view signalUpdate
>
> On Apr 27, 2014, at 7:28 AM, Johan Fabry <[hidden email]> wrote:
>
>> (Back online now, I was/am traveling …)
>>
>> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>>
>> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>>
>> <123.tiff>
>>
>> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>>> Under the last version of Roassal, your code produces:
>>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>>
>>> Alexandre
>>>
>>>
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by abergel

Looks cool, thanks a lot!

On Apr 28, 2014, at 7:02 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi!
>
> I have added a #offsetOnEdge: to RTLabelled.
> The method takes as argument a float, between 0.0 and 1.0.
> 1.0 means it is on the starting extremity.
> 0.0 means it is on the ending extremity.
>
> Here is an example:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> | view elements e1 |
> view := RTView new.
> elements :=  ((RTEllipse new size: 30; color: Color black))
>                        elementsOn: #(one two).
> view addAll: elements.
> elements @ RTDraggable.
> RTCircleLayout new initialRadius: 70; on: elements.
>
> e1 := RTEdge from: elements first to: elements second.
> e1 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '12'; view: view; offsetOnEdge: 0.3).
> view add: e1.
> "e2 := RTEdge from: elements second to: elements first.
> e2 + (RTDirectedLine new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) + (RTArrow new color: Color black; attachPoint: RTShorterDistanceAttachPoint new) @ (RTLabelled new text: '21'; view: view).
> view add: e2."
> view open.
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
>
>
> On Apr 27, 2014, at 8:28 AM, Johan Fabry <[hidden email]> wrote:
>
>> (Back online now, I was/am traveling …)
>>
>> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>>
>> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>>
>> <123.tiff>
>>
>> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>>
>>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>>> Under the last version of Roassal, your code produces:
>>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>>
>>> Alexandre
>>>
>>>
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

jfabry
In reply to this post by abergel
Sorry for the confusion. I have arrowheads on my edge shapes, so if in the code below you have

shape := (RTLine new color: Color red) + (RTArrow new color: Color red).

it does not work anymore :-( In your first example nothing happens and in your second example the arrowheads do not change.

Also, what is a TrachelShape?

On Apr 28, 2014, at 7:11 PM, Alexandre Bergel <[hidden email]> wrote:

> Strange. It works for me:
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | v es edges shape |
> v := RTView new.
> es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
> RTCircleLayout new initialRadius: 100; on: es.
> v addAll: es.
>
> shape := RTLine new color: Color red.
> edges := RTEdge
> buildEdgesFromObjects: (1 to: 20)
> from: [ :value | value // 2 ]
> to: #yourself
> using: shape
> inView: v.
>
> v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].
>
> v open
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Else, you can directly change the color of the Trachel shape behind the edge:
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> | v es edges shape |
> v := RTView new.
> es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
> RTCircleLayout new initialRadius: 100; on: es.
> v addAll: es.
>
> shape := RTLine new color: Color red.
> edges := RTEdge
> buildEdgesFromObjects: (1 to: 20)
> from: [ :value | value // 2 ]
> to: #yourself
> using: shape
> inView: v.
>
> v canvas addMenu: 'change color' callback: [  edges  do: [ :e | e trachelShape color: Color random ]. v signalUpdate ].
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> Let me know how it goes...
>
> v open
>
>
> On Apr 27, 2014, at 5:11 PM, Johan Fabry <[hidden email]> wrote:
>
>>
>> Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue)  and I do the following **after the view has already been opened** nothing happens:
>>
>> edge shape color: Color red.
>> edge update.
>> view signalUpdate
>>
>> On Apr 27, 2014, at 7:28 AM, Johan Fabry <[hidden email]> wrote:
>>
>>> (Back online now, I was/am traveling …)
>>>
>>> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>>>
>>> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>>>
>>> <123.tiff>
>>>
>>> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>>>
>>>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>>>> Under the last version of Roassal, your code produces:
>>>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>>>
>>>> Alexandre
>>>>
>>>>
>>>
>>>
>>>
>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>
>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>>
>> ---> Save our in-boxes! http://emailcharter.org <---
>>
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal: two arrow questions

abergel
We are again facing the problem on shape composition.

Try this:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v es edges shape |
v := RTView new.
es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
RTCircleLayout new initialRadius: 100; on: es.
v addAll: es.

shape := (RTLine new color: Color red) + (RTArrow new color: Color red).
edges := RTEdge
        buildEdgesFromObjects: (1 to: 20)
        from: [ :value | value // 2 ]
        to: #yourself
        using: shape
        inView: v.

v canvas addMenu: 'change color' callback: [  
        edges  do: [ :e |
                e trachelShape shape1 color: Color random.
                e trachelShape shape2 color: Color random ].
        v signalUpdate ].
v open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

On Apr 29, 2014, at 8:34 AM, Johan Fabry <[hidden email]> wrote:

> Sorry for the confusion. I have arrowheads on my edge shapes, so if in the code below you have
>
> shape := (RTLine new color: Color red) + (RTArrow new color: Color red).
>
> it does not work anymore :-( In your first example nothing happens and in your second example the arrowheads do not change.
>
> Also, what is a TrachelShape?
>
> On Apr 28, 2014, at 7:11 PM, Alexandre Bergel <[hidden email]> wrote:
>
>> Strange. It works for me:
>>
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> | v es edges shape |
>> v := RTView new.
>> es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
>> RTCircleLayout new initialRadius: 100; on: es.
>> v addAll: es.
>>
>> shape := RTLine new color: Color red.
>> edges := RTEdge
>> buildEdgesFromObjects: (1 to: 20)
>> from: [ :value | value // 2 ]
>> to: #yourself
>> using: shape
>> inView: v.
>>
>> v canvas addMenu: 'change color' callback: [ shape color: Color random. edges do: #update. v signalUpdate ].
>>
>> v open
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> Else, you can directly change the color of the Trachel shape behind the edge:
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> | v es edges shape |
>> v := RTView new.
>> es := (RTEllipse new size: 20; color: (Color blue alpha: 0.4)) elementsOn: (1 to: 20).
>> RTCircleLayout new initialRadius: 100; on: es.
>> v addAll: es.
>>
>> shape := RTLine new color: Color red.
>> edges := RTEdge
>> buildEdgesFromObjects: (1 to: 20)
>> from: [ :value | value // 2 ]
>> to: #yourself
>> using: shape
>> inView: v.
>>
>> v canvas addMenu: 'change color' callback: [  edges  do: [ :e | e trachelShape color: Color random ]. v signalUpdate ].
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> Let me know how it goes...
>>
>> v open
>>
>>
>> On Apr 27, 2014, at 5:11 PM, Johan Fabry <[hidden email]> wrote:
>>
>>>
>>> Also, could it be that changing colors of edges when they are already displayed is broken? If I have an RTEdge in the variable edge (and it is blue)  and I do the following **after the view has already been opened** nothing happens:
>>>
>>> edge shape color: Color red.
>>> edge update.
>>> view signalUpdate
>>>
>>> On Apr 27, 2014, at 7:28 AM, Johan Fabry <[hidden email]> wrote:
>>>
>>>> (Back online now, I was/am traveling …)
>>>>
>>>> Thanks Alex, it looks better now. But the labels are actually at the beginning extremities, maybe it would be better to indeed have them at the end? Look at the example to see the current situation, it does not look so good when the lines are long (green and orange line), plus for me it is confusing to have the label at the beginning of the line (blue lines).
>>>>
>>>> Also, font size is not uniform anymore, I have no idea why this suddenly changed. Not pretty :-(
>>>>
>>>> <123.tiff>
>>>>
>>>> On Apr 25, 2014, at 11:25 AM, Alexandre Bergel <[hidden email]> wrote:
>>>>
>>>>> I have updated Roassal. Edges are now slightly closer to the ending extremities.
>>>>> Under the last version of Roassal, your code produces:
>>>>> <Screen Shot 2014-04-25 at 11.24.36 AM.png>
>>>>>
>>>>> Alexandre
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>>
>>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>>
>>> ---> Save our in-boxes! http://emailcharter.org <---
>>>
>>> Johan Fabry   -   http://pleiad.cl/~jfabry
>>> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> ---> Save our in-boxes! http://emailcharter.org <---
>
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev