ManimCommunity / ManimCommunity/manim
OpenGLSVGMobject doesn't render like SVGMobject: Horizontal lines seem to have no stroke and black text is white.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
Here is a PNG of an opengl rendering of an SVG (for an image of the the original SVG see below):

Note that I am using v0.9.0 even though the PNG window shows v0.6.0 (see issue #1875).
The a PNG of the original SVG is (click on the image to see it better since it doesn't have a background color):

As we can see, the horizontal line has stroke width and the text at the very bottom of the image is black.
When this SVG is rendered with Cairo, I see the expected behavior.
## Expected behavior
For OpenGLSVGMobject to treat SVG files the same was as SVGMobject.
## How to reproduce the issue
Use any SVG with black text and a horizontal line that has stroke width to it.
Code for reproducing the problem
```py
Paste your code here.
```
## Additional media files
Images/GIFs
## Logs
Terminal output
```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```
## System specifications
System Details
- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 20.04
- RAM: 16 GB
- Python version (`python/py/python3 --version`): 3.8.10
- Installed modules (provide output from `pip list`):
```
Package Version
--------------------------------- ------------
alabaster 0.7.12
anyio 3.2.1
apipkg 1.5
appdirs 1.4.4
argon2-cffi 20.1.0
astroid 2.6.2
async-generator 1.10
attrs 21.2.0
Babel 2.9.1
backcall 0.2.0
backports.entry-points-selectable 1.1.0
beautifulsoup4 4.9.3
black 20.8b1
bleach 3.3.0
certifi 2021.5.30
cffi 1.14.6
cfgv 3.3.0
chardet 4.0.0
charset-normalizer 2.0.1
click 8.0.1
click-default-group 1.2.2
cloup 0.7.1
colorama 0.4.4
colour 0.1.5
commonmark 0.9.1
coverage 5.5
cycler 0.10.0
dearpygui 0.8.31
debugpy 1.3.0
decorator 5.0.9
defusedxml 0.7.1
Deprecated 1.2.12
distlib 0.3.2
docutils 0.16
entrypoints 0.3
execnet 1.9.0
filelock 3.0.12
flake8 3.9.2
flake8-bugbear 21.4.3
flake8-builtins 1.5.3
flake8-comprehensions 3.4.0
flake8-docstrings 1.6.0
flake8-logging-format 0.6.0
flake8-plugin-utils 1.3.1
flake8-pytest-style 1.4.1
flake8-rst-docstrings 0.0.14
furo 2021.6.18b36
gitdb 4.0.7
GitPython 3.1.18
glcontext 2.3.4
guzzle-sphinx-theme 0.7.11
identify 2.2.11
idna 3.2
imagesize 1.2.0
iniconfig 1.1.1
ipykernel 5.5.5
ipython 7.25.0
ipython-genutils 0.2.0
isort 5.9.2
jedi 0.18.0
Jinja2 3.0.1
json5 0.9.6
jsonschema 3.2.0
jupyter-client 6.2.0
jupyter-core 4.7.1
jupyter-server 1.9.0
jupyterlab 3.0.16
jupyterlab-pygments 0.1.2
jupyterlab-server 2.6.1
kiwisolver 1.3.1
lazy-object-proxy 1.6.0
manim 0.9.0
ManimPango 0.3.0
mapbox-earcut 0.12.10
MarkupSafe 2.0.1
matplotlib 3.4.2
matplotlib-inline 0.1.2
mccabe 0.6.1
mistune 0.8.4
moderngl 5.6.4
moderngl-window 2.4.0
mpmath 1.2.1
multipledispatch 0.6.0
mypy-extensions 0.4.3
nbclassic 0.3.1
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
networkx 2.6.1
nodeenv 1.6.0
notebook 6.4.0
numpy 1.21.0
packaging 21.0
pandas 1.1.5
pandocfilters 1.4.3
parso 0.8.2
pathspec 0.8.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.2.0
pip 21.0.1
platformdirs 2.0.2
pluggy 0.13.1
pre-commit 2.13.0
prometheus-client 0.11.0
prompt-toolkit 3.0.19
psutil 5.8.0
ptyprocess 0.7.0
py 1.10.0
pycairo 1.20.1
pycodestyle 2.7.0
pycparser 2.20
pydocstyle 6.0.0
pydub 0.25.1
pyflakes 2.3.1
PyGithub 1.55
pyglet 1.5.18
Pygments 2.9.0
PyJWT 2.1.0
pylint 2.9.3
PyNaCl 1.4.0
pyparsing 2.4.7
pyrr 0.10.3
pyrsistent 0.18.0
pytest 6.2.4
pytest-cov 2.12.1
pytest-forked 1.3.0
pytest-xdist 2.3.0
python-dateutil 2.8.1
pytz 2021.1
PyYAML 5.4.1
pyzmq 22.1.0
recommonmark 0.7.1
regex 2021.7.6
requests 2.26.0
requests-unixsocket 0.2.0
restructuredtext-lint 1.3.2
rich 10.6.0
scipy 1.6.0
screeninfo 0.6.7
Send2Trash 1.7.1
setuptools 52.0.0
six 1.16.0
smmap 4.0.0
sniffio 1.2.0
snowballstemmer 2.1.0
soupsieve 2.2.1
Sphinx 3.5.4
sphinx-copybutton 0.4.0
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
sphinxext-opengraph 0.4.2
terminado 0.10.1
testpath 0.5.0
toml 0.10.2
tornado 6.1
tqdm 4.61.2
traitlets 5.0.5
typed-ast 1.4.3
typing-extensions 3.10.0.0
urllib3 1.26.6
virtualenv 20.5.0
watchdog 2.1.3
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.1.0
wheel 0.36.2
wrapt 1.12.1
```
LaTeX details
+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
FFMPEG
Output of `ffmpeg -version`:
```
PASTE HERE
```
## Additional comments
Contributor guide
Research direction
Start by comparing the OpenGLSVGMobject and SVGMobject rendering paths, then reproduce the issue with an SVG containing black text and a horizontal line with stroke width. Done means OpenGLSVGMobject renders those elements like the Cairo-backed SVGMobject.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100