NDrawingView Fit Not Accounting for Stroke Width?


https://www.nevron.com/Forum/Topic13070.aspx
Print Topic | Close Window

By Jason Irby - 2 Years Ago
We have an app where the user can place shapes on a drawing and the requirement is that after modification we call a "Fit" so the document is sized just to fit the contents with a small specified margin. Like:
https://www.nevron.com/forum/uploads/images/6978b7f3-5e3e-40ce-bb0f-dc3f.png


However, we also allow them to alter the shapes stroke width to any arbitrary value.  When we do, the NDrawingView Fit fails to account for that stroke thickness and the result is bleed off the view.  For requirements reasons that is a problem.  Like:

https://www.nevron.com/forum/uploads/images/3fb1c61a-8d99-434c-b836-6555.png

When selected, it can be seen that is is sizing to the path but not accounting for the stroke:

https://www.nevron.com/forum/uploads/images/3bef978c-241a-442a-97bd-0f22.png

Assuming I can't just use more margin just in case, is there a way to tell Fit to take stroke into account?

We are still on version 10.6.23.12.  

Thanks in advance,
Jason