mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
Update README.md
Update Sample code
This commit is contained in:
parent
801896cf8f
commit
56e474ffab
1 changed files with 7 additions and 2 deletions
|
@ -30,7 +30,7 @@ ThorVG renders vector shapes on a given canvas buffer.
|
||||||
|
|
||||||
You can initialize ThorVG engine first:
|
You can initialize ThorVG engine first:
|
||||||
```cpp
|
```cpp
|
||||||
tvg::Initializer::init(tvg::CanvasEngine::Sw);
|
tvg::Initializer::init(tvg::CanvasEngine::Sw, 0); //engine method, thread count
|
||||||
```
|
```
|
||||||
You can prepare a empty canvas for drawing on it.
|
You can prepare a empty canvas for drawing on it.
|
||||||
```cpp
|
```cpp
|
||||||
|
@ -54,7 +54,12 @@ Begin rendering & finish it at a particular time.
|
||||||
canvas->draw();
|
canvas->draw();
|
||||||
canvas->sync();
|
canvas->sync();
|
||||||
```
|
```
|
||||||
Lastly, you can acquire the rendered image in buffer memory.
|
Now you can acquire the rendered image in buffer memory.
|
||||||
|
|
||||||
|
Lastly, terminate the engine after usage.
|
||||||
|
```cpp
|
||||||
|
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
||||||
|
```
|
||||||
|
|
||||||
[Back to contents](#contents)
|
[Back to contents](#contents)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue