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

Manage a stack of local graphic state #290

Merged
merged 68 commits into from
Nov 12, 2021
Merged

Manage a stack of local graphic state #290

merged 68 commits into from
Nov 12, 2021

Conversation

gmischler
Copy link
Collaborator

as of #250 (second part).

  • New ability to change graphics state settings temporarily.
  • New context manager .local_context() to create a temporary state environment.
  • Rotations don't conflict with graphics state settings anymore.
  • Templates don't need to jump through hoops anymore to rotate stuff.

*Values of csv files are converted by position, instead of content
* Updated tests to check for regression
* Updated documentation and tests to include multiline text.
restrict decimal seperator replacement to float fields
@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #290 (18bd976) into master (5a08e1b) will increase coverage by 0.23%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #290      +/-   ##
==========================================
+ Coverage   87.18%   87.41%   +0.23%     
==========================================
  Files          16       17       +1     
  Lines        3832     3871      +39     
  Branches      816      802      -14     
==========================================
+ Hits         3341     3384      +43     
+ Misses        318      314       -4     
  Partials      173      173              
Impacted Files Coverage Δ
fpdf/fpdf.py 83.93% <100.00%> (-0.16%) ⬇️
fpdf/graphics_state.py 100.00% <100.00%> (ø)
fpdf/template.py 93.23% <100.00%> (+1.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a08e1b...18bd976. Read the comment docs.

Copy link
Member

@Lucas-C Lucas-C left a comment

Choose a reason for hiding this comment

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

Good job overall @gmischler !

I made a few comments on your PR

CHANGELOG.md Outdated Show resolved Hide resolved
fpdf/fpdf.py Outdated Show resolved Hide resolved
fpdf/fpdf.py Outdated Show resolved Hide resolved
fpdf/fpdf.py Show resolved Hide resolved
fpdf/graphics_state.py Show resolved Hide resolved
fpdf/fpdf.py Outdated Show resolved Hide resolved
fpdf/graphics_state.py Show resolved Hide resolved
fpdf/graphics_state.py Show resolved Hide resolved
test/template/test_flextemplate.py Show resolved Hide resolved
@Lucas-C Lucas-C merged commit 3b6a8d9 into py-pdf:master Nov 12, 2021
@Lucas-C
Copy link
Member

Lucas-C commented Nov 12, 2021

Thank you @gmischler for this great code refactoring!

@Lucas-C
Copy link
Member

Lucas-C commented Nov 19, 2021

FYI I mentioned you in this blog article 😉
https://chezsoi.org/lucas/blog/hacktoberfest-on-fpdf2.html

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