mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
common: hotfix regression bugs during recent dev
- fixed Duplicate/Text samples broken - fixed a Lottie TextPath memory leaks - fixed a broken SVG gaussian blur
This commit is contained in:
parent
3fc69b36a7
commit
eddd8961f3
4 changed files with 7 additions and 5 deletions
|
@ -129,7 +129,6 @@ struct UserExample : tvgexam::Example
|
||||||
auto text10 = tvg::Text::gen();
|
auto text10 = tvg::Text::gen();
|
||||||
text10->font("Arial", 50);
|
text10->font("Arial", 50);
|
||||||
text10->text("Linear Text");
|
text10->text("Linear Text");
|
||||||
text10->translate(0, 350);
|
|
||||||
text10->bounds(&x, &y, &w2, &h2);
|
text10->bounds(&x, &y, &w2, &h2);
|
||||||
|
|
||||||
//LinearGradient
|
//LinearGradient
|
||||||
|
@ -144,15 +143,16 @@ struct UserExample : tvgexam::Example
|
||||||
fill->colorStops(colorStops, 3);
|
fill->colorStops(colorStops, 3);
|
||||||
text10->fill(fill);
|
text10->fill(fill);
|
||||||
|
|
||||||
|
text10->translate(0, 350);
|
||||||
|
|
||||||
canvas->push(text10);
|
canvas->push(text10);
|
||||||
|
|
||||||
auto text11 = tvg::Text::gen();
|
auto text11 = tvg::Text::gen();
|
||||||
text11->font("NanumGothicCoding", 40);
|
text11->font("NanumGothicCoding", 40);
|
||||||
text11->text("\xeb\x82\x98\xeb\x88\x94\xea\xb3\xa0\xeb\x94\x95\xec\xbd\x94\xeb\x94\xa9\x28\x55\x54\x46\x2d\x38\x29");
|
text11->text("\xeb\x82\x98\xeb\x88\x94\xea\xb3\xa0\xeb\x94\x95\xec\xbd\x94\xeb\x94\xa9\x28\x55\x54\x46\x2d\x38\x29");
|
||||||
text11->translate(0, 450);
|
|
||||||
text11->bounds(&x, &y, &w2, &h2);
|
text11->bounds(&x, &y, &w2, &h2);
|
||||||
|
|
||||||
//LinearGradient
|
//RadialGradient
|
||||||
auto fill2 = tvg::RadialGradient::gen();
|
auto fill2 = tvg::RadialGradient::gen();
|
||||||
fill2->radial(x + w2 * 0.5f, y + h2 * 0.5f, w2 * 0.5f, x + w2 * 0.5f, y + h2 * 0.5f, 0.0f);
|
fill2->radial(x + w2 * 0.5f, y + h2 * 0.5f, w2 * 0.5f, x + w2 * 0.5f, y + h2 * 0.5f, 0.0f);
|
||||||
|
|
||||||
|
@ -163,8 +163,11 @@ struct UserExample : tvgexam::Example
|
||||||
colorStops2[2] = {1, 255, 255, 255, 255};
|
colorStops2[2] = {1, 255, 255, 255, 255};
|
||||||
|
|
||||||
fill2->colorStops(colorStops2, 3);
|
fill2->colorStops(colorStops2, 3);
|
||||||
|
|
||||||
text11->fill(fill2);
|
text11->fill(fill2);
|
||||||
|
|
||||||
|
text11->translate(0, 450);
|
||||||
|
|
||||||
canvas->push(text11);
|
canvas->push(text11);
|
||||||
|
|
||||||
auto text12 = tvg::Text::gen();
|
auto text12 = tvg::Text::gen();
|
||||||
|
|
|
@ -393,6 +393,7 @@ struct LottieText : LottieObject, LottieRenderPooler<tvg::Shape>
|
||||||
~LottieText()
|
~LottieText()
|
||||||
{
|
{
|
||||||
ARRAY_FOREACH(p, ranges) delete(*p);
|
ARRAY_FOREACH(p, ranges) delete(*p);
|
||||||
|
delete(followPath);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -375,7 +375,6 @@ static Paint* _applyFilter(SvgLoaderData& loaderData, Paint* paint, const SvgNod
|
||||||
|
|
||||||
auto clip = Shape::gen();
|
auto clip = Shape::gen();
|
||||||
clip->appendRect(clipBox.x, clipBox.y, clipBox.w, clipBox.h);
|
clip->appendRect(clipBox.x, clipBox.y, clipBox.w, clipBox.h);
|
||||||
clip->transform(paint->transform());
|
|
||||||
scene->clip(clip);
|
scene->clip(clip);
|
||||||
|
|
||||||
return scene;
|
return scene;
|
||||||
|
|
|
@ -149,7 +149,6 @@ struct Text::Impl : Paint::Impl
|
||||||
|
|
||||||
auto text = Text::gen();
|
auto text = Text::gen();
|
||||||
auto dup = TEXT(text);
|
auto dup = TEXT(text);
|
||||||
dup->parent = text;
|
|
||||||
|
|
||||||
SHAPE(shape)->duplicate(dup->shape);
|
SHAPE(shape)->duplicate(dup->shape);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue