RT-20302: Consider changing picking behavior of dashed strokes

Joshua Marinacci joshua at marinacci.org
Wed May 9 10:35:40 PDT 2012

In the olden days of java2d we wouldn't ask swing to do this for us. Instead we would grab the final outline from the dashed shape as another shape and do the calculation yourself. The problem with javafx is that we don't have such access ( at least without bringing in java2d apis. )

Sent from my iPhone

On May 9, 2012, at 9:54 AM, "Dr. Michael Paus" <mp at jugs.org> wrote:

> It is in general always a good idea to keep things consistent but one also has to keep in mind
> performance and the potential use-cases. So, how do you expect the picking performance to be
> affected by this change? Concerning use-cases. What is the expectation of a user? I have to admit
> that I would probably be surprised if I could not pick/select say a circle at some point of its
> obvious border only because the border happens to be dashed instead of being solid.
> Finally it all depends on how you want picking to behave in general. Is it a geometrical
> operation of a graphical operation. It's a pity that JavaFX does not offer us any choice
> here, because for some use-cases a geometrical interpretation, which is independent of
> the graphical appearance of a shape, is much better suited as I have outlined here:
> http://javafx-jira.kenai.com/browse/RT-20452
> Michael
> Am 09.05.2012 17:44, schrieb Lubomir Nerad:
>> Hi,
>> I would like to change mouse picking behavior of objects with dashed stroke as described in http://javafx-jira.kenai.com/browse/RT-20302. Currently an object is picked even when the mouse click happens in the non-filled parts (inside spaces) of the dashed stroke (stroke dash array and dash offset have no impact on picking). With RT-19994, this can create an unexpected situation, when a Shape is picked inside stroke spaces, but if it is used in a CAG operation (for example Shape.intersect(shape1, shape1)) the resulting Shape won't include the spaces and so won't be picked inside of them. To get consistent behavior I propose not to pick the spaces inside object stokes.
>> Do you agree?
>> Thanks,
>> Lubo
> -- 
> --------------------------------------------------------------------------------------
> Dr. Michael Paus, Chairman of the Java User Group Stuttgart e.V. (JUGS).
> For more information visit www.jugs.de.

More information about the openjfx-dev mailing list