mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
svg_loader: fixing color parsing
For colors given in a style attribute in the format "rgb(rrr, ggg, bbb)" a parsing was incorect. Now fixed.
This commit is contained in:
parent
20e926c950
commit
7ffeb2e606
1 changed files with 1 additions and 1 deletions
|
@ -277,7 +277,7 @@ static unsigned char _parserColor(const char* value, char** end)
|
||||||
{
|
{
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
r = svgUtilStrtof(value + 4, end);
|
r = svgUtilStrtof(value, end);
|
||||||
*end = _skipSpace(*end, nullptr);
|
*end = _skipSpace(*end, nullptr);
|
||||||
if (**end == '%') r = 255 * r / 100;
|
if (**end == '%') r = 255 * r / 100;
|
||||||
*end = _skipSpace(*end, nullptr);
|
*end = _skipSpace(*end, nullptr);
|
||||||
|
|
Loading…
Add table
Reference in a new issue