examples: terminate the same engine as was initialized 02/289002/1
authorMira Grudzinska <m.grudzinska@samsung.com>
Fri, 21 Jan 2022 22:45:03 +0000 (23:45 +0100)
committerMichal Szczecinski <mihashco89@gmail.com>
Mon, 27 Feb 2023 08:25:13 +0000 (09:25 +0100)
Change-Id: I3e1b3cbee003fa18fdec8b554588d3420473aa08

14 files changed:
src/examples/AnimateMasking.cpp
src/examples/GradientMasking.cpp
src/examples/GradientStroke.cpp
src/examples/InvMasking.cpp
src/examples/LumaMasking.cpp
src/examples/Masking.cpp
src/examples/MultiCanvas.cpp
src/examples/PictureJpg.cpp
src/examples/PicturePng.cpp
src/examples/PictureRaw.cpp
src/examples/Stress.cpp
src/examples/Svg.cpp
src/examples/Svg2.cpp
src/examples/Tvg.cpp

index 7f1ba236e2e4a7d945fb371e8aded050eeea2484..48cbe7090465f40f6e76c440f22d383b6aa2280e 100644 (file)
@@ -103,7 +103,7 @@ void tvgUpdateCmds(tvg::Canvas* canvas, float progress)
        You can update only necessary properties of this shape,
        while retaining other properties. */
 
-    // Translate mask object with its stroke & update 
+    // Translate mask object with its stroke & update
     pMaskShape->translate(0 , progress * 300);
     pMask->translate(0 , progress * 300);
 
index bafc21a3779e52b9bb5c0a20f95b5d05b8d39362..b8b88ea0a106b08737444c5a4d3c185ef6e20904 100644 (file)
@@ -47,7 +47,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
     colorStops[1] = {1,255,255,255,255};
     fill->colorStops(colorStops,2);
     shape->fill(move(fill));
+
     shape->composite(move(mask), tvg::CompositeMethod::AlphaMask);
     canvas->push(move(shape));
 
@@ -79,7 +79,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
     colorStops1[1] = {1,1,255,255,255};
     fill1->colorStops(colorStops1,2);
     shape1->fill(move(fill1));
+
     shape1->composite(move(mask1), tvg::CompositeMethod::AlphaMask);
     canvas->push(move(shape1));
 
@@ -237,7 +237,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 8b04aa2db8e46a901c2e8c12b4151fcf3b8b0176..6e2b97ee534fdf9b3912f383e09f18c5e69937be 100644 (file)
@@ -77,7 +77,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
 
     if (canvas->push(move(shape1)) != tvg::Result::Success) return;
 
-    // radial gradient stroke + duplicate 
+    // radial gradient stroke + duplicate
     auto shape2 = tvg::Shape::gen();
     shape2->appendCircle(600, 175, 100, 60);
     shape2->stroke(80);
index cd4b0a32604cac45efae6b6cc7d87bf994b131a5..4b6eb3186d2a3ff622785e74f4f225a646f3f633 100644 (file)
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 45b15489e20521a4a7adb68650ce3c9975c062a7..cb32d1be9cf83f250cdf7f6ceebdd7d8a323b527 100644 (file)
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 8b63b0bafd6432b3c251d6a1ba6708213ad8ac96..88be49a6e9dd0ce871c84121390b5d584365ebfe 100644 (file)
@@ -212,7 +212,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 006223f2d3a12e0e0b1f208e2a3bfe5dcb1b995c..f622a0517a81ffcb37149ed0a2f1c160e3534705 100644 (file)
@@ -178,7 +178,7 @@ void tvgGlTest(const char* name, const char* path, void* data)
     objData->name = strdup(name);
     objData->path = strdup(path);
 
-    Eo* win = (Eo*) data;   
+    Eo* win = (Eo*) data;
 
     Eo* view = elm_glview_add(win);
     elm_glview_mode_set(view, ELM_GLVIEW_ALPHA);
@@ -189,7 +189,7 @@ void tvgGlTest(const char* name, const char* path, void* data)
     evas_object_data_set(view, "objdata", reinterpret_cast<void*>(objData));
     evas_object_event_callback_add(view, EVAS_CALLBACK_DEL, gl_del, objData);
     evas_object_resize(view, SIZE, SIZE);
-    evas_object_move(view, (count % NUM_PER_LINE) * SIZE, SIZE * (count / NUM_PER_LINE)); 
+    evas_object_move(view, (count % NUM_PER_LINE) * SIZE, SIZE * (count / NUM_PER_LINE));
     evas_object_show(view);
 }
 
@@ -238,7 +238,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index df56f3e2c09f211d802d6f33323c467e5b1b0f58..c04b34bf696c2a967eed2d7067d1b84a1696171c 100644 (file)
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
 
     } else {
index 0cbaedb4135cbde2e363be360288b21358c7797f..b43926add1912bf01ae84b5d30db488a8e74e817 100644 (file)
@@ -31,7 +31,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
 {
     if (!canvas) return;
 
-    //Background                            
+    //Background
     auto bg = tvg::Shape::gen();
     bg->appendRect(0, 0, WIDTH, HEIGHT, 0, 0);    //x, y, w, h, rx, ry
     bg->fill(255, 255, 255, 255);                 //r, g, b, a
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
 
     } else {
index dcb86fce95c2b5804bf43be4c2a77d8e3b476656..ea6de16e4d9b85268731a244985441edba71760b 100644 (file)
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 004561bf0b9583bc46400d6ea00c621ac93ed3ba..cd8843d2723cc400b84d6af3df36d06eb89a8ddf 100644 (file)
@@ -236,7 +236,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index be4f35784dabf3bbe1f81933e8ee86d259aacd7b..53e950200d40c9e9ca6771ba8b79ead7be39dc76 100644 (file)
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index a7c97da17905296c085a1d70e7b89013c9a2f2cc..011816e1cf156b255586aae2fd7dcdcd08a36b21 100644 (file)
@@ -147,7 +147,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;
index 51c6af8a8533926271efd82b8a7f135179865159..5512f43df15ae58eabbc879454ae13f99038935d 100644 (file)
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
         elm_shutdown();
 
         //Terminate ThorVG Engine
-        tvg::Initializer::term(tvg::CanvasEngine::Sw);
+        tvg::Initializer::term(tvgEngine);
 
     } else {
         cout << "engine is not supported" << endl;