From: Hermet Park Date: Wed, 16 Sep 2020 10:42:42 +0000 (+0900) Subject: updated README X-Git-Tag: accepted/tizen/unified/20200923.024103~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=232e15c6c2b5107fcce6b9ddb66886a89af2b2f8;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git updated README Change-Id: Ie90c9db06824ce2028e35969b777e5d582018d58 --- diff --git a/README.md b/README.md index 4b3fb71..54f1571 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 0000000..ca68df6 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 0000000..0bf7333 Binary files /dev/null and b/res/example_tiger.png differ