Add element rotation/mirror transforms and coerce string visible - #23
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…e values
Add generic rotation and mirror as standard fields supported on every
element type, handled centrally so no element handler changes. Each
transformed element is rendered onto its own layer, then mirrored/rotated
about a pivot and composited back.
- rotation: degrees, positive = clockwise (arbitrary values)
- mirror: "h", "v", or "hv"
- pivot: bbox anchor keyword (e.g. "tl") or [x, y] canvas coords;
defaults to the element's visual center
Distinct from the image-only `rotate` field (which rotates the source
image before fitting it to the box).
Also coerce string `visible` values so templated output works as expected:
"false" (case-insensitive) and empty/whitespace strings hide the element;
any other non-empty string shows it. Previously bool("false") was truthy,
so a template rendering "false" wrongly showed the element.
Docs and auto-generated rotation/mirror screenshots added.
g4bri3lDev
force-pushed
the
feat/visible-coercion-transforms
branch
from
June 25, 2026 11:28
ce9d9d3 to
92b16fd
Compare
Pivot anchor keywords now parse positionally like Pillow text anchors (first char horizontal l/m/r, second vertical t/m/b), instead of an order-independent scan that mis-resolved 'mt'/'mb' to the center. Also unify the README anchor docs: text, icon, icon_sequence and pivot share one anchor table. The separate icon table documented a vertical-first scheme (tl/bl/br) that the Pillow-native icon handler no longer uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.