mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 11:36:25 +00:00
Update README.md
updated sample code
This commit is contained in:
parent
bd4cda3c73
commit
fb5586447f
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ ThorVG renders vector shapes to a given canvas buffer. The following is a quick
|
||||||
First, you should initialize the ThorVG engine:
|
First, you should initialize the ThorVG engine:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
tvg::Initializer::init(tvg::CanvasEngine::Sw, 0); //engine method, thread count
|
tvg::Initializer::init(0); //thread count
|
||||||
```
|
```
|
||||||
|
|
||||||
Then it would be best if you prepared an empty canvas for drawing on it:
|
Then it would be best if you prepared an empty canvas for drawing on it:
|
||||||
|
@ -218,7 +218,7 @@ Then you can acquire the rendered image from the buffer memory.
|
||||||
Lastly, terminate the engine after its usage:
|
Lastly, terminate the engine after its usage:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
tvg::Initializer::term(tvg::CanvasEngine::Sw);
|
tvg::Initializer::term();
|
||||||
```
|
```
|
||||||
[Back to contents](#contents)
|
[Back to contents](#contents)
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Add table
Reference in a new issue