summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Gilbert <gilbertt@users.sourceforge.net>2000-09-03 19:14:02 +0000
committerTom Gilbert <gilbertt@users.sourceforge.net>2000-09-03 19:14:02 +0000
commite3d927d32caeb113a6cb4ed2ea0209af27d079a0 (patch)
tree003b2daddffb5e178424edc2a36cc898f5747efe /test
parent222e1b5f320155985bc5cacd3cc63c272e901866 (diff)
downloadimlib2-e3d927d32caeb113a6cb4ed2ea0209af27d079a0.tar.gz
Better API, simpler polygon struct. imlib_polygon_new() now, no type member.
Then _draw_polygon(polygon, unsigned int closed), and _fill_polygon(poly). SVN revision: 3305
Diffstat (limited to 'test')
-rw-r--r--test/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/main.c b/test/main.c
index 2611904..2d27210 100644
--- a/test/main.c
+++ b/test/main.c
@@ -295,17 +295,17 @@ int main (int argc, char **argv)
sec1=(int)timev.tv_sec; /* and stores it so we can time outselves */
usec1=(int)timev.tv_usec; /* we will use this to vary speed of rot */
- poly = imlib_polygon_new(POLY_FILLED);
+ poly = imlib_polygon_new();
imlib_polygon_add_point(poly, 400,50);
imlib_polygon_add_point(poly, 450,100);
imlib_polygon_add_point(poly, 350,100);
- poly2 = imlib_polygon_new(POLY_OPEN);
+ poly2 = imlib_polygon_new();
imlib_polygon_add_point(poly2, 400,150);
imlib_polygon_add_point(poly2, 450,200);
imlib_polygon_add_point(poly2, 350,200);
- poly3 = imlib_polygon_new(POLY_CLOSED);
+ poly3 = imlib_polygon_new();
imlib_polygon_add_point(poly3, 400,250);
imlib_polygon_add_point(poly3, 450,300);
imlib_polygon_add_point(poly3, 350,300);
@@ -849,15 +849,15 @@ int main (int argc, char **argv)
/* test polygons */
imlib_context_set_color(255, 0, 0, 255);
- imlib_image_draw_polygon(poly);
+ imlib_image_fill_polygon(poly);
imlib_context_set_color(255, 255, 255, 255);
- imlib_image_draw_polygon(poly2);
- imlib_image_draw_polygon(poly3);
+ imlib_image_draw_polygon(poly2,0);
+ imlib_image_draw_polygon(poly3,1);
imlib_image_draw_rectangle(380,260,50,50);
imlib_context_set_color(255, 55, 55, 255);
imlib_context_set_cliprect(380,260,50,50);
- imlib_image_draw_polygon(poly3);
+ imlib_image_draw_polygon(poly3,1);
imlib_context_set_cliprect(0,0,0,0);
}