GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
7.29k stars 385 forks source link

Fix bounding boxes of VectorData with rotations in several nodes #1792

Closed LukeFranceschini closed 1 week ago

LukeFranceschini commented 1 week ago

The VectorData::bounding_box() function does not apply the VectorData's transform, and bounding_box_with_transform() must be used instead of applying the transform to the computed bounding box. It may make sense in the future to move the current version of bounding_box to a private method bounding_box_no_transform() and have the public bounding_box call bounding_box_with_transform so that external code doesn't need to know about how the VectorData stores it's data.

This fixes the following nodes:

Also add a test to the bounding box node for this situation.

Keavon commented 1 week ago

@0HyperCube transforms are your area of expertise so I'd love if you could take a moment to review this, thanks!

Keavon commented 1 week ago

!build

github-actions[bot] commented 1 week ago
📦 Build Complete for ed1e1d9b317fe243433d9c7b890fd66554393f07
https://5cfdbd26.graphite.pages.dev