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

Introducing a rect_clip() function #158

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Introducing a rect_clip() function #158

wants to merge 3 commits into from

Conversation

Lucas-C
Copy link

@Lucas-C Lucas-C commented Jul 21, 2020

This is really useful to display only part of image.

Usage example:

    with pdf.rect_clip(x=..., y=..., w=..., h=...):
        pdf.image(filepath, x, y)

I can add tests if needed

@alexanderankin
Copy link

it would probably be good to add docs as well, but im not the person who can accept pull requests on this fork of the project

@Lucas-C
Copy link
Author

Lucas-C commented Jul 22, 2020

Documentation added, thanks for the suggestion @alexanderankin!

@Lucas-C
Copy link
Author

Lucas-C commented Jul 22, 2020

Tested added:

$ python tests/cover/test_rect_clip.py --auto --check
OK

@Lucas-C
Copy link
Author

Lucas-C commented Jan 6, 2021

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.

2 participants