Summary: | GEF Geometry Line's boundsInParent is not correct calculated | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] GEF | Reporter: | Shenwei Zheng <szheng> | ||||
Component: | GEF Geometry | Assignee: | gef-inbox <gef-inbox> | ||||
Status: | NEW --- | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | eklipse, matthias.wienand, szheng | ||||
Version: | 5.0.100 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows 10 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Shenwei Zheng
2018-08-13 05:40:48 EDT
I added a test case w.r.t. the incorrect behavior of GeometryNode when using BUTT stroke line cap. The test also contains a conversion from the individual JavaFX bounds (layout-bounds, bounds-in-local, bounds-in-parent) to the geometric bounds of the wrapped geometry (to improve understandability, e.g. due to internal workings of JavaFX, bounds-in-local contain a "minimum pen size" that needs to be compensated). Due to the complexity of GeometryNode -- necessary for automatic, geometry-preserving resizement and other niceties -- bounds need to be computed by GeometryNode, which is rather complicated. The current approximation of the underlying JavaFX computations is conceptually undesirable and is nearly impossible to get correct in all situations, also considering future changes applied to JavaFX, different platforms, etc. Therefore, I would opt for providing an additional concept for the rendering of GEF geometries: - We could provide SimpleGeometryNode, extending JavaFX Path, and just bridging to GEF Geometry, i.e. providing geometry accessors. - In order to preserve the clickable-area-behavior associated with GeometryNode, we could potentially provide a ClickableAreaNode that can wrap a JavaFX Path. - Then, you should be able to leverage all JavaFX functionality while still being able to comfortably render and interact with GEF Geometry objects. - Also, the bounds computations are then done by JavaFX alone, so there cannot be any inconsistencies, with the exception of inconsistencies stemming from the conversion of a GEF Geometry to a JavaFX Path. |