TRLineShape>>includesPoint:

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

TRLineShape>>includesPoint:

Peter Uhnak
Hi Alex,

would it be possible to allow specification of epsilon for TRLineShape>>includesPoint:?

Having it small makes sense if it is processed by machine, but trying to click on it by hand is hard.
Alternatively I could subclass it in my program but then I would have to change it also in all RTLabel subclasses. Or is there better way? Changing the epsilon seems most straightforward to me.

Peter

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

Re: TRLineShape>>includesPoint:

abergel
Hi Peter,

I have just added TRLineShape>>includesPoint:delta:
This is what you need I guess.
I have also increased to 5 the default amount of pixels for the epsilon. Let me know.

Just to let you know, you can use “@RTHighlightable” on edges. Do you know this?

You can play with this:
=-=-=-==-=-=-==-=-=-==-=-=-=
b := RTGraphBuilder new.
b nodes circle size: 20; color: Color gray.
b edges
        connectTo: #dependentClasses;
        width: 3;
        highlightable;
        useInLayout.
b layout
        forceCharge: -80.
b addAll: (RTShape withAllSubclasses).
b build
=-=-=-==-=-=-==-=-=-==-=-=-=

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



On Oct 7, 2014, at 6:09 PM, Peter Uhnák <[hidden email]> wrote:

> Hi Alex,
>
> would it be possible to allow specification of epsilon for TRLineShape>>includesPoint:?
>
> Having it small makes sense if it is processed by machine, but trying to click on it by hand is hard.
> Alternatively I could subclass it in my program but then I would have to change it also in all RTLabel subclasses. Or is there better way? Changing the epsilon seems most straightforward to me.
>
> Peter
> _______________________________________________
> 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: TRLineShape>>includesPoint:

Peter Uhnak
Hi Alex,

sorry I wasn't specific enough, I'll try better next time.
the idea was to add it in a form of setter so it could be changed from outside, because things like RTHighlightable depend on TRMouseEnter or clicking on TRMouseClick, which is determined by calling includesPoint:

So something like
edge := RTLine edgeFrom: el1 to: el2.
edge shape delta: 10.
edge @ RTHighlightable.

Also I tried it with the increased epsilon to 5 and it is enough for our needs. I asked for it originally so current settings wouldn't be affected, but since you changed them there is no need for the setter now.

Thank you!

Peter


On Wed, Oct 8, 2014 at 8:35 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Peter,

I have just added TRLineShape>>includesPoint:delta:
This is what you need I guess.
I have also increased to 5 the default amount of pixels for the epsilon. Let me know.

Just to let you know, you can use “@RTHighlightable” on edges. Do you know this?

You can play with this:
=-=-=-==-=-=-==-=-=-==-=-=-=
b := RTGraphBuilder new.
b nodes circle size: 20; color: Color gray.
b edges
        connectTo: #dependentClasses;
        width: 3;
        highlightable;
        useInLayout.
b layout
        forceCharge: -80.
b addAll: (RTShape withAllSubclasses).
b build
=-=-=-==-=-=-==-=-=-==-=-=-=

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



On Oct 7, 2014, at 6:09 PM, Peter Uhnák <[hidden email]> wrote:

> Hi Alex,
>
> would it be possible to allow specification of epsilon for TRLineShape>>includesPoint:?
>
> Having it small makes sense if it is processed by machine, but trying to click on it by hand is hard.
> Alternatively I could subclass it in my program but then I would have to change it also in all RTLabel subclasses. Or is there better way? Changing the epsilon seems most straightforward to me.
>
> Peter
> _______________________________________________
> 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


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

Re: TRLineShape>>includesPoint:

abergel
Ok. So no need to add the accessor for now.
Let me know how it goes

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



On Oct 9, 2014, at 8:57 AM, Peter Uhnák <[hidden email]> wrote:

Hi Alex,

sorry I wasn't specific enough, I'll try better next time.
the idea was to add it in a form of setter so it could be changed from outside, because things like RTHighlightable depend on TRMouseEnter or clicking on TRMouseClick, which is determined by calling includesPoint:

So something like
edge := RTLine edgeFrom: el1 to: el2.
edge shape delta: 10.
edge @ RTHighlightable.

Also I tried it with the increased epsilon to 5 and it is enough for our needs. I asked for it originally so current settings wouldn't be affected, but since you changed them there is no need for the setter now.

Thank you!

Peter


On Wed, Oct 8, 2014 at 8:35 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Peter,

I have just added TRLineShape>>includesPoint:delta:
This is what you need I guess.
I have also increased to 5 the default amount of pixels for the epsilon. Let me know.

Just to let you know, you can use “@RTHighlightable” on edges. Do you know this?

You can play with this:
=-=-=-==-=-=-==-=-=-==-=-=-=
b := RTGraphBuilder new.
b nodes circle size: 20; color: Color gray.
b edges
        connectTo: #dependentClasses;
        width: 3;
        highlightable;
        useInLayout.
b layout
        forceCharge: -80.
b addAll: (RTShape withAllSubclasses).
b build
=-=-=-==-=-=-==-=-=-==-=-=-=

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



On Oct 7, 2014, at 6:09 PM, Peter Uhnák <[hidden email]> wrote:

> Hi Alex,
>
> would it be possible to allow specification of epsilon for TRLineShape>>includesPoint:?
>
> Having it small makes sense if it is processed by machine, but trying to click on it by hand is hard.
> Alternatively I could subclass it in my program but then I would have to change it also in all RTLabel subclasses. Or is there better way? Changing the epsilon seems most straightforward to me.
>
> Peter
> _______________________________________________
> 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

_______________________________________________
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