swhitty/SwiftDraw

Insetting a PDF: make Insets public

Closed this issue · 2 comments

Hello,

I want to add some inset to my pdf.

I noticed that it's possible to do it using the pdfData(size: CGSize? = nil, insets: Insets = .zero) function.

But the Inset type used by this function is not public so it can't be modified (always .zero).

Is there another way to apply an inset or should this type be public?

Thanks!
Axel

I just realised I can do the following

var insets: SVG.Insets = SVG.Insets.zero
insets.bottom = -50
insets.left = -50
insets.bottom = -50
insets.right = -50

But maybe it could be better to have a public way to create it.

I've added a public initialiser to SVG.Inputs and made a pull request: #56