mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
example: clear buffer properly.
The update might affect areas outside of the default window. Update the sample to handle window resizing.
This commit is contained in:
parent
2c7a83406e
commit
58418afac8
1 changed files with 3 additions and 0 deletions
|
@ -66,6 +66,9 @@ struct UserExample : tvgexam::Example
|
||||||
{
|
{
|
||||||
if (!canvas) return false;
|
if (!canvas) return false;
|
||||||
|
|
||||||
|
//clear buffer and redraw!
|
||||||
|
if (!tvgexam::verify(canvas->clear(false))) return false;
|
||||||
|
|
||||||
auto progress = tvgexam::progress(elapsed, 2.0f, true); //play time 2 sec.
|
auto progress = tvgexam::progress(elapsed, 2.0f, true); //play time 2 sec.
|
||||||
|
|
||||||
//Reset Shape
|
//Reset Shape
|
||||||
|
|
Loading…
Add table
Reference in a new issue