examples: ++bounding box

This commit is contained in:
Hermet Park 2025-04-10 12:31:46 +09:00
parent b38b6b659d
commit a4ed00b08e

View file

@ -243,6 +243,25 @@ struct UserExample : tvgexam::Example
bbox(canvas, scene); bbox(canvas, scene);
} }
{
auto scene = tvg::Scene::gen();
scene->translate(790, 390);
scene->scale(0.5f);
scene->rotate(20);
auto shape = tvg::Shape::gen();
shape->moveTo(0, 0);
shape->lineTo(300, 200);
shape->lineTo(0, 200);
shape->fill(255, 0, 255);
shape->close();
shape->rotate(20);
scene->push(shape);
canvas->push(scene);
bbox(canvas, scene);
}
{ {
auto scene = tvg::Scene::gen(); auto scene = tvg::Scene::gen();
scene->translate(250, 490); scene->translate(250, 490);