Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insetting a PDF: make Insets public #55

Closed
alpennec opened this issue Nov 5, 2024 · 2 comments · Fixed by #56
Closed

Insetting a PDF: make Insets public #55

alpennec opened this issue Nov 5, 2024 · 2 comments · Fixed by #56

Comments

@alpennec
Copy link
Contributor

alpennec commented Nov 5, 2024

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

@alpennec
Copy link
Contributor Author

alpennec commented Nov 5, 2024

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.

@alpennec
Copy link
Contributor Author

alpennec commented Nov 5, 2024

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

@swhitty swhitty linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant