diff --git a/examples/ImageScaling.cpp b/examples/ImageScaling.cpp index 7f9cb77d..635daea9 100644 --- a/examples/ImageScaling.cpp +++ b/examples/ImageScaling.cpp @@ -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; diff --git a/examples/Viewport.cpp b/examples/Viewport.cpp index 840a915d..9af0b7e9 100644 --- a/examples/Viewport.cpp +++ b/examples/Viewport.cpp @@ -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);