Repository navigation
feat(export): chart and ERD PNG are drawn from the light SVG by default (#1163) - #1235
Merged
Merged
Conversation
…lt (#1163) PNG export was a screenshot of the current theme, so with a dark theme the PNG was dark even though the SVG was light. With the light palette, the PNG is now rasterised from the same SVG document the SVG export saves (flutter_svg's PictureInfo on a canvas, at the same scale the ERD already capped at 8192 px). With the current-theme setting, PNG stays a screenshot, as before. The chart's SVG builder is shared by the SVG and PNG exports.
The export reads its setting from the local database first; opening it in a fresh test process can take longer than the 2 s the chart tests waited.
…ase (#1163) The export reads its setting from the local database; in CI several test processes share that database, so the chart export tests waited on a read that sometimes stalled. A test seam answers the setting in the chart tests; the application still reads the database.
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.
Refs #1163
What was wrong
PNG export was a screenshot of the current theme. With a dark theme the PNG was dark while the SVG was light, so the two did not match, and the default export of an image was dark (#1163's first acceptance item).
Changes
svgToPng(core/export/svg_png.dart): renders an SVG document to PNG bytes withflutter_svg'svg.loadPictureon a canvas at a given scale. Versions checked in the lock: flutter_svg 2.3.0, vector_graphics 1.2.3._chartSvg).Not in this PR
Not verified locally
Tests were not run locally, per the project rule.