mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +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;
|
||||
|
||||
picture->scale(1.5f);
|
||||
|
||||
canvas->push(picture);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -36,6 +36,9 @@ struct UserExample : tvgexam::Example
|
|||
{
|
||||
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();
|
||||
mask->appendCircle(w/2, h/2, w/2, h/2);
|
||||
mask->fill(255, 255, 255);
|
||||
|
|
Loading…
Add table
Reference in a new issue