PKDrawing bounds are calculated in another way relying on the strokes width, even when visually the drawing wouldn’t exceed its container bounds, in reality, after I save and restore it, I get a non anticipated bounds kind it. For instance:
There’s a PKCanvasView of a measurement w:330 x h:260
.
I save the drawing canvas.drawing.dataRepresentation()
, and as soon as I restore it canvas.drawing = strive PKDrawing(knowledge: drawData)
, I can get drawing bounds as so (x:-24.0, y:-45.0, w:381.0, h:406.0)
if I take advantage of large strokes, nevertheless the drawing remains to be completely fitted contained in the canvas with none spacial scaling achieved on my facet.
Might any individual clarify this behaviour, in addition to the adverse coordinates.
Principally I would like to determine the best way to get the precise bounds of the drawing regardless its strokes width.