Skip to content

Commit ac884e4

Browse files
authored
Fix bounding box on images (#120)
1 parent 69b680d commit ac884e4

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

star/src/turtle/preprocess.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ impl Turtle for PreprocessTurtle {
2323

2424
#[cfg(feature = "image")]
2525
fn image(&mut self, image: super::elements::RasterImage) {
26-
self.bounding_box = self.bounding_box.union(&image.dimensions);
26+
self.bounding_box = Box2D::from_points([
27+
self.bounding_box.min,
28+
self.bounding_box.max,
29+
image.dimensions.min,
30+
image.dimensions.max,
31+
]);
2732
}
2833

2934
fn fill_polygon(&mut self, polygon: FillPolygon) {

0 commit comments

Comments
 (0)