pris icon indicating copy to clipboard operation
pris copied to clipboard

Rotate and bounding boxes

Open ruuda opened this issue 7 years ago • 0 comments

I want to add a rotate function, but bounding boxes are tricky. We can rotate the bounding box, and compute the new bounding box that fits it, but that means that rotating by pi/4 twice is not the same as rotating by pi/2 once, which would be a shame.

An alternative would be to never flatten bounding boxes, but to compute them on the fly. This would work for rotating compound frames, and it would solve the twice pi/4 vs once pi/2 problem. A tricky thing is computing bounding boxes for shapes made of Bézier curves. It’s doable though, and we don't have curves yet anyway, but I do intend to support them. For polygons it’s not too hard.

ruuda avatar Aug 18 '18 11:08 ruuda