From 50f03eca14829b758c494d7b87e326ded2a4bd89 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 9 Oct 2015 22:28:10 -0400 Subject: [PATCH] More arc testing. --- test/drawtests.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/drawtests.c b/test/drawtests.c index d2c3a2af..d38c8891 100644 --- a/test/drawtests.c +++ b/test/drawtests.c @@ -81,7 +81,7 @@ static void drawOriginal(uiAreaDrawParams *p) 50, 30. * (M_PI / 180.), 300. * (M_PI / 180.)); - // TODO add a checkbox for this + // the sweep test below doubles as a clockwise test so a checkbox isn't needed anymore uiDrawPathLineTo(path, 400, 100); uiDrawPathNewFigureWithArc(path, 510, 100, @@ -89,6 +89,20 @@ static void drawOriginal(uiAreaDrawParams *p) 30. * (M_PI / 180.), 300. * (M_PI / 180.)); uiDrawPathCloseFigure(path); + // and now with 330 to make sure sweeps work properly + uiDrawPathNewFigure(path, 400, 210); + uiDrawPathArcTo(path, + 400, 210, + 50, + 30. * (M_PI / 180.), + 330. * (M_PI / 180.)); + uiDrawPathLineTo(path, 400, 210); + uiDrawPathNewFigureWithArc(path, + 510, 210, + 50, + 30. * (M_PI / 180.), + 330. * (M_PI / 180.)); + uiDrawPathCloseFigure(path); uiDrawPathEnd(path); sp.Cap = uiDrawLineCapFlat; sp.Join = uiDrawLineJoinMiter; @@ -170,6 +184,7 @@ static void drawOriginal(uiAreaDrawParams *p) uiDrawFreePath(path); } +// TODO test that a sweep of 0 draws nothing static void drawArcs(uiAreaDrawParams *p) { uiDrawPath *path;