diff --git a/res/svg/LottieFiles_logo.svg b/res/svg/LottieFiles_logo.svg deleted file mode 100644 index ec06de2..0000000 --- a/res/svg/LottieFiles_logo.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - lf_Logo - Created with Sketch. - - - - - - - - \ No newline at end of file diff --git a/res/svg/thorvg-logo-clear.svg b/res/svg/thorvg-logo-clear.svg new file mode 100644 index 0000000..a59088b --- /dev/null +++ b/res/svg/thorvg-logo-clear.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/EffectDropShadow.cpp b/src/EffectDropShadow.cpp index 8060b01..c5f48a7 100644 --- a/src/EffectDropShadow.cpp +++ b/src/EffectDropShadow.cpp @@ -40,18 +40,15 @@ struct UserExample : tvgexam::Example bg->fill(255, 255, 255); canvas->push(bg); - float pw, ph; - //Prepare a scene for post effects { scene1 = tvg::Scene::gen(); auto picture = tvg::Picture::gen(); - picture->load(EXAMPLE_DIR"/svg/LottieFiles_logo.svg"); - - picture->size(&pw, &ph); - picture->size(pw * 0.5f, ph * 0.5f); - picture->translate(pw * 0.175f, 0.0f); + picture->load(EXAMPLE_DIR"/svg/thorvg-logo-clear.svg"); + picture->scale(0.5f); + picture->origin(0.5f, 0.0f); + picture->translate(float(w / 2), 0.0f); scene1->push(picture); canvas->push(scene1); @@ -63,10 +60,9 @@ struct UserExample : tvgexam::Example auto picture = tvg::Picture::gen(); picture->load(EXAMPLE_DIR"/svg/152932619-bd3d6921-72df-4f09-856b-f9743ae32a14.svg"); - - picture->size(&pw, &ph); - picture->translate(pw * 0.45f, ph * 0.45f); - picture->size(pw * 0.75f, ph * 0.75f); + picture->scale(0.6f); + picture->origin(0.5f, 0.0f); + picture->translate(float(w / 2), 250.0f); scene2->push(picture); canvas->push(scene2); @@ -78,10 +74,9 @@ struct UserExample : tvgexam::Example auto picture = tvg::Picture::gen(); picture->load(EXAMPLE_DIR"/svg//circles1.svg"); - - picture->size(&pw, &ph); - picture->translate(w * 0.3f, h * 0.65f); - picture->size(pw * 0.75f, ph * 0.75f); + picture->scale(0.7f); + picture->origin(0.5f, 0.0f); + picture->translate(float(w / 2), 550.0f); scene3->push(picture); canvas->push(scene3);