example stroke: updated the sample
authorHermet Park <chuneon.park@samsung.com>
Fri, 19 Nov 2021 04:32:13 +0000 (13:32 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Fri, 19 Nov 2021 05:29:11 +0000 (14:29 +0900)
src/examples/Stroke.cpp

index 254ef91a3567b34dc4b7d72e522eccceee37206b..3e6bf3d3e8506d9872936a66a8953a6a1e12b980 100644 (file)
@@ -91,15 +91,15 @@ void tvgDrawCmds(tvg::Canvas* canvas)
     for (int i = 0; i < 10; ++i) {
         auto hline = tvg::Shape::gen();
         hline->moveTo(50, 550 + (25 * i));
-        hline->lineTo(400, 550 + (25 * i));
+        hline->lineTo(300, 550 + (25 * i));
         hline->stroke(255, 255, 255, 255);       //color: r, g, b, a
         hline->stroke(i + 1);                    //stroke width
         hline->stroke(tvg::StrokeCap::Round);    //default is Square
         if (canvas->push(move(hline)) != tvg::Result::Success) return;
 
         auto vline = tvg::Shape::gen();
-        vline->moveTo(450 + (33 * i), 550);
-        vline->lineTo(450 + (33 * i), 780);
+        vline->moveTo(500 + (25 * i), 550);
+        vline->lineTo(500 + (25 * i), 780);
         vline->stroke(255, 255, 255, 255);       //color: r, g, b, a
         vline->stroke(i + 1);                    //stroke width
         vline->stroke(tvg::StrokeCap::Round);    //default is Square
@@ -108,8 +108,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
 
     //Stroke cap test
     auto line1 = tvg::Shape::gen();
-    line1->moveTo(320, 580);
-    line1->lineTo(490, 580);
+    line1->moveTo(360, 580);
+    line1->lineTo(450, 580);
     line1->stroke(255, 255, 255, 255);           //color: r, g, b, a
     line1->stroke(15);
     line1->stroke(tvg::StrokeCap::Round);