mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
Update README.md
This commit is contained in:
parent
4c0bce3fdc
commit
bd18e29c39
1 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,15 @@ shape->fill(255, 255, 0, 255); //r, g, b, a
|
|||
|
||||
canvas->push(move(shape)); //push shape drawing command
|
||||
```
|
||||
|
||||
This code snippet shows you how to draw SVG image.
|
||||
```cpp
|
||||
auto picture = tvg::Picture::gen(); //generate a picture
|
||||
picture->load("sample.svg"); //Load SVG file.
|
||||
|
||||
canvas->push(move(picture)); //push picture drawing command
|
||||
```
|
||||
|
||||
Begin rendering & finish it at a particular time.
|
||||
```cpp
|
||||
canvas->draw();
|
||||
|
|
Loading…
Add table
Reference in a new issue