mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
examples: ++bounding box
This commit is contained in:
parent
b38b6b659d
commit
a4ed00b08e
1 changed files with 20 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue