summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorscuri <scuri>2009-11-27 22:44:15 +0000
committerscuri <scuri>2009-11-27 22:44:15 +0000
commitd96819756a30e82b52798487343a4fcbdec11a88 (patch)
tree628d1c0bc03ee7eb443dba2850d34b589f2d32c1 /test
parentc4ca69d3fa84dca98dce71c7a71b61413d6be165 (diff)
Fixed: polygon filling in the IMAGERGB driver when the segments contain horizontal lines.
Diffstat (limited to 'test')
-rw-r--r--test/simple/simple.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/test/simple/simple.c b/test/simple/simple.c
index a16ceb2..82eeb9c 100644
--- a/test/simple/simple.c
+++ b/test/simple/simple.c
@@ -1211,8 +1211,8 @@ void draw_wd(void)
cdFlush();
}
-void SimpleDrawTest(void)
-//void SimpleDrawTestHardCopy(void)
+//void SimpleDrawTest(void)
+void SimpleDrawTestHardCopy(void)
{
int w, h;
cdGetCanvasSize(&w, &h, 0, 0);
@@ -1239,6 +1239,8 @@ void SimpleDrawTestImageRGB(void)
cdCanvas* canvas = cdCreateCanvas(CD_IMAGERGB, "2048x2048");
cdActivate(canvas);
+ simple_draw = DRAW_TEST;
+
red = calloc(size, 1);
green = calloc(size, 1);
blue = calloc(size, 1);
@@ -1257,6 +1259,7 @@ void SimpleDrawTestImageRGB(void)
void SimpleDrawVectorFont(void)
{
simple_draw = DRAW_TEST;
+
cdBackground(CD_WHITE);
cdClear();
cdLineStyle(CD_CONTINUOUS);
@@ -1313,3 +1316,24 @@ void SimpleDrawVectorFont(void)
}
cdFlush();
}
+
+void SimpleDrawTest(void)
+//void SimpleDrawPoly(void)
+{
+ int w, h;
+ cdGetCanvasSize(&w, &h, 0, 0);
+
+ simple_draw = DRAW_TEST;
+
+ cdBackground(CD_WHITE);
+ cdClear();
+
+ cdInteriorStyle(CD_SOLID);
+ cdBegin(CD_FILL);
+ cdVertex(w/4, h/4);
+ cdVertex(w/2-w/8, h/4);
+ cdVertex(w/2, h/2);
+ cdVertex(w/2-w/8, h/2);
+
+ cdEnd();
+}