mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 04:24:28 +00:00
SvgLoader: Fix wrong display when dasharray size is 1
If dash array size is 1, it means that dash and gap size are the same.
This commit is contained in:
parent
a0cd190548
commit
855397be36
1 changed files with 4 additions and 3 deletions
|
@ -233,13 +233,14 @@ _parseDashArray(const char *str, SvgDash* dash)
|
|||
{
|
||||
char *end = nullptr;
|
||||
|
||||
while (*str)
|
||||
{
|
||||
while (*str) {
|
||||
// skip white space, comma
|
||||
str = _skipComma(str);
|
||||
(*dash).array.push(strtof(str, &end));
|
||||
str = _skipComma(end);
|
||||
}
|
||||
}
|
||||
//If dash array size is 1, it means that dash and gap size are the same.
|
||||
if ((*dash).array.cnt == 1) (*dash).array.push((*dash).array.list[0]);
|
||||
}
|
||||
|
||||
static string* _idFromUrl(const char* url)
|
||||
|
|
Loading…
Add table
Reference in a new issue