Update README.md

This commit is contained in:
Hermet Park 2020-09-09 11:11:24 +09:00 committed by GitHub
parent 4c0bce3fdc
commit bd18e29c39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,15 @@ shape->fill(255, 255, 0, 255); //r, g, b, a
canvas->push(move(shape)); //push shape drawing command 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. Begin rendering & finish it at a particular time.
```cpp ```cpp
canvas->draw(); canvas->draw();