Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn users when their SVGMobject's match the background #1090

Open
jsonvillanueva opened this issue Mar 9, 2021 · 1 comment
Open

Warn users when their SVGMobject's match the background #1090

jsonvillanueva opened this issue Mar 9, 2021 · 1 comment
Labels
enhancement Additions and improvements in general SVG

Comments

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Mar 9, 2021

Enhancement proposal

The recent enhancements to the SVG engine in #915 has allowed colors to be taken from SVG files (whereas before the behavior initialized with a WHITE color). Unfortunately this now leads to confusion when SVG files have a black (#000000) stroke/fill and no longer appear to render... they do, they're just hidden.

Here's an example of a user running into this issue. I've also succumbed to this despite having fully reviewed the SVG engine and was able to provide a solution (knowing that coloring works), so this would mainly serve as a helpful reminder to the end-user to check their SVG for colors matching the Scene's background color. Hopefully this problem won't be as prevalent in manim help channels as a result.

Additional comments

This could be further extended to deal with the more general VMobject; although, VMobject's don't default to BLACK (most SVG editors do default to BLACK). I believe this check should be done only once on initialization of the general Mobject. Doing it for all frames during animations would hinder performance in some way or another -- but might be a good warning for the future with better GPU support.

@markromanmiller
Copy link
Collaborator

This is trickier than I thought. The background color is part of Camera, but the item color is the property of the Mobject.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general SVG
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants