Blog: build-time SVG and Lottie transcoders (Metal-only on iOS)#5084
Closed
shai-almog wants to merge 1 commit into
Closed
Blog: build-time SVG and Lottie transcoders (Metal-only on iOS)#5084shai-almog wants to merge 1 commit into
shai-almog wants to merge 1 commit into
Conversation
Covers PRs #5042, #5049, and #5066. PR #5042: the maven/svg-transcoder/ module that parses SVG at build time and emits a Codename One Image subclass rendering through the Graphics shape API. SMIL animations honoured. Drop files into src/main/svg/, the build emits Java, Resources.getImage(name) returns them. PR #5049: three iOS Metal and Android rendering fixes that the SVG screenshot tests exposed: - Metal setClip(GeneralPath) flattened to a polyline so the stencil no longer reads as a triangle fan. - Metal drawString reads the effective scale from currentTransform and picks the right atlas font. - LinearGradientPaint.paint drops the duplicated translate. PR #5066: Bodymovin / Lottie JSON files flow through the same pipeline as SVG. New maven/lottie-transcoder/ lowers each Lottie file into the existing SVGDocument model; the same JavaCodeGenerator emits the GeneratedSVGImage subclass; the same SVGRegistry handles both. No new Image base class, no per-port wiring. Calls out the Metal-only caveat on iOS (the GL ES 2 path does not have the shape coverage). Now that Metal is the default this is a non-issue on most apps.
Collaborator
Author
|
Superseded — consolidating the follow-up posts so this release week ships fewer, broader posts. New merged versions in the follow-up PRs to this one. |
3 tasks
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.
Summary
maven/svg-transcoder/module. SVGs insrc/main/svg/become Codename OneImagesubclasses; SMIL animations honoured; rendered through theGraphicsshape API.setClip(GeneralPath)triangle fan, iOS MetaldrawStringunder affine scale, andLinearGradientPaint.paint's duplicated translate.maven/lottie-transcoder/module. Bodymovin / Lottie JSON files flow through the same pipeline as SVG: sameSVGDocumentmodel, sameJavaCodeGenerator, sameSVGRegistry. No newImagebase class, no per-port wiring.File
docs/website/content/blog/svg-lottie-build-time.md— single new file.Sequencing
Branches off
master; intended to publish after the ORM / mapping / binder post (#5083). Front matter date is2026-06-07.Test plan
docs/websitesucceeds./static/blog/svg-lottie-build-time.jpg.