mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +00:00
sw_engine rle: fixing clipping with non overlaping figures
For clip that did not overlap with the plotted source, the whole source was plotted - the size of the rle data was not updated.
This commit is contained in:
parent
2657acc1bc
commit
29ca149b4b
1 changed files with 6 additions and 1 deletions
|
@ -917,7 +917,12 @@ void rleFree(SwRleData* rle)
|
||||||
|
|
||||||
void updateRleSpans(SwRleData *rle, SwSpan* curSpans, uint32_t size)
|
void updateRleSpans(SwRleData *rle, SwSpan* curSpans, uint32_t size)
|
||||||
{
|
{
|
||||||
if (!rle->spans || !curSpans || size == 0) return;
|
if (size == 0) {
|
||||||
|
rle->size = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!rle->spans || !curSpans) return;
|
||||||
rle->size = size;
|
rle->size = size;
|
||||||
rle->spans = static_cast<SwSpan*>(realloc(rle->spans, rle->size * sizeof(SwSpan)));
|
rle->spans = static_cast<SwSpan*>(realloc(rle->spans, rle->size * sizeof(SwSpan)));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue