Refactor page transformations #851
MartinThoma
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Looks a good idea as will simplify things. I have not looked at the code but can the translate, scale and rotate just be "ease of use" routines just calling a single transform functon that carries out a standard Afine transformation. Chris |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to deprecate those
Page
methods:mergeTransformedPage(self, page2, ctm, expand=False)
mergeScaledPage(self, page2, scale, expand=False)
mergeRotatedPage(self, page2, rotation, expand=False)
mergeRotatedTranslatedPage(self, page2, rotation, tx, ty, expand=False)
mergeRotatedTranslatedPage(self, page2, rotation, tx, ty, expand=False)
mergeRotatedScaledPage(self, page2, rotation, scale, expand=False)
mergeScaledTranslatedPage(self, page2, scale, tx, ty, expand=False)
mergeRotatedScaledTranslatedPage(self, page2, rotation, scale, tx, ty, expand=False)
Instead of those, I would like the users to use a combination of
mergePage(self, page2)
: Ensure that this does not loose transformations of page2 + addexpand
parametertranslate(self)
: Doesn't exist yetscale(self, sx, sy)
/scaleBy(self, factor)
rotateClockwise(self, angle)
The idea would be to have a smaller + better tested interface without loosing any functionality. The additional effort on the users side should be minimal.
How do you think / feel about this?
Beta Was this translation helpful? Give feedback.
All reactions