Hi,
Thanks Alexandre.
With your explanation, I modified the drawOn: for: fromPoint: toPoint: line: method of
ROAbstractRow. I have almost what I want. I removed the line closing the triangle of the
head, I reduced the right and left extremity of the head. But I would like that there is
no space between the head and the body of the arrow. Can you please indicated me where to
look for since I modified the toPointWithOffSet value with any modification on the image?
Perhaps is it in another method that the body of the arrow is defined.
I think that when it will be done, it can interest others (We shouldn't be the only
one using arrow ;))
Thanks in advance.
Anne
drawOn: aCanvas for: anEdge fromPoint: fromPoint toPoint: toPoint line: line
"Draw the arrow on the canvas and return the begining and ending of the
arrow"
| vector u unit arrowMiddle arrowLeft arrowRight w c toPointWithOffset r |
"Draw head"
vector := self getDirectionVectorFrom: fromPoint to: toPoint.
r := vector r.
r = 0 ifTrue: [ ^ Array with: fromPoint with: fromPoint ].
u := vector normal.
unit := vector / r.
toPointWithOffset := toPoint - (offset * (vector r - size) * unit).
arrowMiddle := toPointWithOffset - (unit * size).
arrowLeft := arrowMiddle- (u * size * 0.5).
arrowRight := arrowMiddle + (u * size * 0.5).
w := line width roValue: anEdge.
c := line colorFor: anEdge.
aCanvas line: toPointWithOffset to: arrowLeft width: w color: c.
"aCanvas line: arrowLeft to: arrowRight width: w color: c."
aCanvas line: arrowRight to: toPointWithOffset width: w color: c.
^ Array with: toPointWithOffset with: arrowMiddle
<RoassalArrow.png>
Le 6 mars 2014 à 15:28, Alexandre Bergel a écrit :
Hi!
As you have seen, Roassal offers way to define arrows. Here is a short example:
-=-=-=-=-=-=-=-=-=-=-=-=
| v s e1 e2 l |
v := ROView new.
s := ROEllipse new size: 15.
e1 := s element.
e2 := s element.
e1 @ RODraggable.
e2 @ RODraggable.
e2 translateBy: 50 @ 80.
l := (ROLine new add: (ROArrow new size: 10)) elementFrom: e1 to: e2.
v add: e1; add: e2; add: l.
v open
-=-=-=-=-=-=-=-=-=-=-=-=
<Screen Shot 2014-03-06 at 10.54.46 AM.png>
You can always create a new array by subclassing ROArrow or ROLineDecoration.
Alexandre
On Mar 6, 2014, at 10:36 AM, Anne Etien <anne.etien(a)univ-lille1.fr> wrote:
> Hi,
>
> We are currently making some visualizations of application with Usman. They rely on
method invocations. In that case, it is better to know which method invokes which other
one. We put arrow on our graph, but the only available arrow we found are 'UML like
inheritance' arrow with big triangle. Would it be possible to have other type of arrow
that are more discrete, but nevertheless indicates the sense? (If possible put acute and
not obtuse angle between the two branches of the arrow, it is more easier to see when they
are lot of links).
>
> More over, would it be possible to have hook on the lines to transform them as
broken lines. Indeed, when you have m1 linked to m2 and m2 linked to m1, there is
superposition of the two links so not easy to read. It would be great if we can manually
break the lines to see the two of them.
>
> I put some examples of arrow below.
>
> Thanks a lot in advance.
> Anne
> <images.jpg><images.jpg>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch