From 840e4f54f0a5ca01648373015d92f01b724eab7f Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Fri, 19 Nov 2021 13:32:13 +0900 Subject: [PATCH] example stroke: updated the sample --- src/examples/Stroke.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/examples/Stroke.cpp b/src/examples/Stroke.cpp index 254ef91a..3e6bf3d3 100644 --- a/src/examples/Stroke.cpp +++ b/src/examples/Stroke.cpp @@ -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);