mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
examples: terminate the same engine as was initialized
This commit is contained in:
parent
c44d667f10
commit
74a99867df
14 changed files with 19 additions and 19 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue