-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework LineCellTemplate path and bounds
`calcPath()` has been simplified to essentially Bressenham's algorithm. It only calculates and returns a path, while `getPath()` (previously unused) will call it if needed. `getBounds()` now correctly accounts for the path's quadrant and the position of the first vertex to produce a correctly located and sized bounding box. This method was also simplified to only look at the two endpoints rather than iterating over the entire line. All fields except `pathVertex` are now marked as `transient` since they can be recovered from only `getVertex()` and `pathVertex`. Correspondingly, the quadrant is not longer part of the DTO, and the serialized XML is much smaller. With the above changes in, it was natural to simplify `LineCellTemplateTool` to avoid a lot of case work, especially in not relying on mutations of `getPathVertex()`.
- Loading branch information
1 parent
9583e4f
commit 2f3bac8
Showing
4 changed files
with
171 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.