I recently came across a problem when trying to determine the point of intersection of two lines. http://javafx-jira.kenai.com/browse/RT-27019 If you use the
Line#intersect method you get a Shape back that represents each of the overlapping pixels between two Shapes. That might be useful in some cases, but for my needs I wanted the point at which two lines intersect. That intersection may be rendered as a blob of pixels, but when I'm working with the shapes, my expectation is that I would get back a single point or null if there is no intersection.
This issue cropped up when trying to define a peak on a chromatogram. Using a LineChart to represent the values of the chromatogram, and a polyline to represent a shaded peak, I needed to allow a user to draw a horizontal chord across the peak. The chord could intersect one or both legs of the peak, or lie entirely beneath the peak (in which case vertical lines would be drawn to intersect the legs of the peak. In any case, my expectation was that since most of the shapes are "vectorish" and I don't have to mess with drawing lines pixel by pixel, that an intersection method should give me a single point or a list of points where the chord intersects the peak.
I created a hack around this, but in my mind, there should be some way to deal with shape geometries instead of their graphical representation. Perhaps a
getGeometricIntersection method that returns a list of points where two shapes intersect. If you agree with my reasoning, please vote for my
issue