diff --git a/README.md b/README.md index 4b3fb715..54f15719 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Next you can draw shapes onto the canvas. ```cpp auto rect = tvg::Shape::gen(); //generate a round rectangle rect->appendRect(50, 50, 200, 200, 20, 20); //round geometry(x, y, w, h, rx, ry) -rect->fill(255, 255, 0, 255); //set round rectangle color (r, g, b, a) +rect->fill(100, 100, 0, 255); //set round rectangle color (r, g, b, a) canvas->push(move(rect)); //push round rectangle drawing command auto circle = tvg::Shape::gen(); //generate a circle @@ -71,14 +71,22 @@ circle->fill(move(fill)); //set circle color canvas->push(move(circle)); //push circle drawing command ``` +This code result look like this. +

+ +

-This code snippet shows you how to draw SVG image. +Next, 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. +picture->load("tiger.svg"); //Load SVG file. canvas->push(move(picture)); //push picture drawing command ``` +And here is the result. +

+ +

Begin rendering & finish it at a particular time. ```cpp diff --git a/res/example_shapes.png b/res/example_shapes.png new file mode 100644 index 00000000..ca68df68 Binary files /dev/null and b/res/example_shapes.png differ diff --git a/res/example_tiger.png b/res/example_tiger.png new file mode 100644 index 00000000..0bf7333b Binary files /dev/null and b/res/example_tiger.png differ