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

Enhancement: Add possibility to draw a bordered PDFTable with corners radius #77

Merged
merged 2 commits into from
Jul 12, 2018
Merged

Conversation

emericspiroux
Copy link

@emericspiroux emericspiroux commented Jul 3, 2018

Hello,
First, thank you for your work it's been a long time that I searching for a really good PDF creator and you did it! 👍
But now, I need to copy my old HTML generated pdf to your great solution but i've border radius on it and I saw you don't add this possibility when we draw rect like tables... So, I enhance a little bit PDFGraphics.createRectPath =).

Please find details below :

Solution:
Add radius propriety on PDFLineStyle. Inside PDFGraphics.createRectPath(rect:, outline:) if the radius propriety of outline is not nil, we will use UIBezierPath.init(roundedRect:, cornerRadius:)
Corner radius parameter will be filled with PDFLineStyle.radius.

Changes to be committed:
modified: README.md
modified: Source/Graphics/PDFGraphics.swift
modified: Source/Graphics/PDFLineStyle.swift

Emeric SPIROUX added 2 commits July 3, 2018 11:33
… radius.

Solution: Add `radius` propriety on `PDFLineStyle` inside `PDFGraphics.createRectPath(rect:, outline:)`
If the radius propriety of `outline` is not nil, we will used `UIBezierPath.init(roundedRect:, cornerRadius:)`
corner radius parameter will be filled with `PDFLineStyle.radius`.

 Changes to be committed:
	modified:   README.md
	modified:   Source/Graphics/PDFGraphics.swift
	modified:   Source/Graphics/PDFLineStyle.swift
@emericspiroux emericspiroux mentioned this pull request Jul 4, 2018
@philprime
Copy link
Member

Looks good! Thank you for your contribution! Going to to merge and release it!

@philprime philprime merged commit 5ffb4bc into techprimate:master Jul 12, 2018
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 this pull request may close these issues.

None yet

2 participants