Fix transparent border rendering and ALIGNVCENTER text alignment #241
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.
This PR fixes two text rendering issues:
Transparent borders appearing as black - When text areas have a border color with alpha channel = 00 (transparent), the border should not be drawn. Now checks the color format #RRGGBBAA and returns early if AA == 00. At least on my version of CEWE it seems to like creating a transparent text border when I tell it I don't want a border at all.
ALIGNVCENTER not being applied - Text with ALIGNVCENTER in the textFormat element was not being vertically centered. Now parses the textFormat child element (not attribute), checks for ALIGNVCENTER in the Alignment attribute, and applies proper vertical centering by shrinking the frame to text size and positioning it centered within the original area.
Changes:
Line ~453: Add alpha channel detection in processDecorationBorders()
Lines ~780-787: Parse textFormat element for ALIGNVCENTER flag
Lines ~1134-1145: Apply vertical centering offset when rendering text frames