cppfw / svgren

:camera: SVG rendering library in C++
MIT License
206 stars 41 forks source link

Black background #80

Closed liushui123456 closed 3 years ago

liushui123456 commented 3 years ago

Why the background color is black

liushui123456 commented 3 years ago

@igagis

igagis commented 3 years ago

The background color is transparent black. I.e. after rendering the svg one can blend it to any background they want.

liushui123456 commented 3 years ago

how can i get the white black

igagis commented 3 years ago

white black?

liushui123456 commented 3 years ago

white_back back_background

like this ,I dont want black background

liushui123456 commented 3 years ago

how can i get the first image

igagis commented 3 years ago

Either make your SVG file contain the white background, or after rendering the image you can blend in the white color by hand to each pixel. If you don't know how to do that, you can read about that, for example, here: https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending

liushui123456 commented 3 years ago

Thank you for taking the time to answer my question

igagis commented 3 years ago

you are welcome!