mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
examples: polished for a sleek initial screen appearance
This commit is contained in:
parent
9e6a514022
commit
97b48a97c1
2 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,8 @@ struct UserExample : tvgexam::Example
|
||||||
|
|
||||||
if (!tvgexam::verify(picture->load(EXAMPLE_DIR"/image/scale.jpg"))) return false;
|
if (!tvgexam::verify(picture->load(EXAMPLE_DIR"/image/scale.jpg"))) return false;
|
||||||
|
|
||||||
|
picture->scale(1.5f);
|
||||||
|
|
||||||
canvas->push(picture);
|
canvas->push(picture);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -36,6 +36,9 @@ struct UserExample : tvgexam::Example
|
||||||
{
|
{
|
||||||
if (!canvas) return false;
|
if (!canvas) return false;
|
||||||
|
|
||||||
|
//set viewport before canvas become dirty.
|
||||||
|
if (!tvgexam::verify(canvas->viewport(0, 0, VPORT_SIZE, VPORT_SIZE))) return false;
|
||||||
|
|
||||||
auto mask = tvg::Shape::gen();
|
auto mask = tvg::Shape::gen();
|
||||||
mask->appendCircle(w/2, h/2, w/2, h/2);
|
mask->appendCircle(w/2, h/2, w/2, h/2);
|
||||||
mask->fill(255, 255, 255);
|
mask->fill(255, 255, 255);
|
||||||
|
|
Loading…
Add table
Reference in a new issue