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

Pattern feature implementation #1041

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

boushrabnd
Copy link

@boushrabnd boushrabnd commented Dec 5, 2023

This PR attempts to implement the Pattern Feature described by Issue #790.

Our current approach is to follow the same pipeline as set_font(). We have broken down the task into the following subtasks:

  • Creating PDFpattern class

  • Adding the set_fill_pattern method

  • Creating PDFpattern objects and adding them to the PDF Pattern dictionary

  • Serializing the call to a pattern

  • Documentation

  • Tests

Checklist:

  • The GitHub pipeline is OK (green),
    meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.

  • A unit test is covering the code added / modified by this PR

  • This PR is ready to be merged

  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A mention of the change is present in CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

fpdf/drawing.py Outdated
Comment on lines 1269 to 1278
@property
def fill_pattern(self):
"""The desired fill pattern for this path/group."""
pass

@fill_pattern.setter
def fill_pattern(self, new):
"""The desired fill pattern for this path/group."""
pass

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those getter / setter do nothing, are in fact not really needed if the property you introduced is public (no leading underscore)

@Lucas-C Lucas-C marked this pull request as draft December 5, 2023 09:18
@Lucas-C
Copy link
Member

Lucas-C commented Dec 5, 2023

Thank you for initiating a PR 👍

I converted it into a draft for now, as this seems still incomplete.
I'll perform a code review once some unit tests have been added to this PR 😊

@boushrabnd
Copy link
Author

Thank you for initiating a PR 👍

I converted it into a draft for now, as this seems still incomplete. I'll perform a code review once some unit tests have been added to this PR 😊

Sorry! I should have made it a draft thank you!

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

4 participants