mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
svg2png: clear the target buffer before the drawing. (#1910)
buffer clearing is mandatory for the thorvg now. issue: https://github.com/thorvg/thorvg/issues/1909
This commit is contained in:
parent
7389593235
commit
1a0af71155
1 changed files with 2 additions and 2 deletions
|
@ -130,6 +130,8 @@ public:
|
|||
return 1;
|
||||
}
|
||||
|
||||
canvas->clear();
|
||||
|
||||
//Background color if needed
|
||||
if (bgColor != 0xffffffff) {
|
||||
uint8_t r = (uint8_t)((bgColor & 0xff0000) >> 16);
|
||||
|
@ -154,8 +156,6 @@ public:
|
|||
|
||||
cout << "Generated PNG file: " << dst << endl;
|
||||
|
||||
canvas->clear(true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue