summaryrefslogtreecommitdiff
path: root/src/gdk/cdgdk.c
diff options
context:
space:
mode:
authorscuri <scuri>2010-05-21 21:54:49 +0000
committerscuri <scuri>2010-05-21 21:54:49 +0000
commit95a0b9f784c2c4eddd86e51eac3a1ae9394cdf49 (patch)
tree2153b840982d2ccdc621a387e0d5110baa5267e0 /src/gdk/cdgdk.c
parentcc487d4de29a48d8e20a9a8492957a5950d5c181 (diff)
*** empty log message ***
Diffstat (limited to 'src/gdk/cdgdk.c')
-rw-r--r--src/gdk/cdgdk.c94
1 files changed, 49 insertions, 45 deletions
diff --git a/src/gdk/cdgdk.c b/src/gdk/cdgdk.c
index 1eccaa8..e16a73a 100644
--- a/src/gdk/cdgdk.c
+++ b/src/gdk/cdgdk.c
@@ -886,51 +886,55 @@ static void cdgettextsize(cdCtxCanvas *ctxcanvas, const char *s, int len, int *w
static void cdpoly(cdCtxCanvas *ctxcanvas, int mode, cdPoint* poly, int n)
{
- int i;
-
- if (mode != CD_BEZIER)
- {
- for (i = 0; i < n; i++)
- {
- if (ctxcanvas->canvas->use_matrix)
- cdMatrixTransformPoint(ctxcanvas->xmatrix, poly[i].x, poly[i].y, &(poly[i].x), &(poly[i].y));
- }
- }
-
- switch( mode )
- {
- case CD_FILL:
- if (ctxcanvas->canvas->new_region)
- {
- GdkRegion* rgn = gdk_region_polygon((GdkPoint*)poly, n, ctxcanvas->canvas->fill_mode == CD_EVENODD ? GDK_EVEN_ODD_RULE : GDK_WINDING_RULE);
- sCombineRegion(ctxcanvas, rgn);
- }
- else
- gdk_draw_polygon(ctxcanvas->wnd, ctxcanvas->gc, TRUE, (GdkPoint*)poly, n);
- break;
-
- case CD_CLOSED_LINES:
- cdgdkCheckSolidStyle(ctxcanvas, 1);
- gdk_draw_polygon(ctxcanvas->wnd, ctxcanvas->gc, FALSE, (GdkPoint*)poly, n);
- cdgdkCheckSolidStyle(ctxcanvas, 0);
- break;
-
- case CD_OPEN_LINES:
- cdgdkCheckSolidStyle(ctxcanvas, 1);
- gdk_draw_lines(ctxcanvas->wnd, ctxcanvas->gc, (GdkPoint*)poly, n);
- cdgdkCheckSolidStyle(ctxcanvas, 0);
- break;
-
- case CD_CLIP:
- ctxcanvas->clip_rgn = gdk_region_polygon((GdkPoint*)poly, n, ctxcanvas->canvas->fill_mode == CD_EVENODD ? GDK_EVEN_ODD_RULE : GDK_WINDING_RULE);
- if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON)
- cdclip(ctxcanvas, CD_CLIPPOLYGON);
- break;
-
- case CD_BEZIER:
- cdSimPolyBezier(ctxcanvas->canvas, poly, n);
- break;
- }
+ int i;
+
+ if (mode != CD_BEZIER)
+ {
+ for (i = 0; i < n; i++)
+ {
+ if (ctxcanvas->canvas->use_matrix)
+ cdMatrixTransformPoint(ctxcanvas->xmatrix, poly[i].x, poly[i].y, &(poly[i].x), &(poly[i].y));
+ }
+ }
+
+ switch( mode )
+ {
+ case CD_FILL:
+ if (ctxcanvas->canvas->new_region)
+ {
+ GdkRegion* rgn = gdk_region_polygon((GdkPoint*)poly, n, ctxcanvas->canvas->fill_mode == CD_EVENODD ? GDK_EVEN_ODD_RULE : GDK_WINDING_RULE);
+ sCombineRegion(ctxcanvas, rgn);
+ }
+ else
+ gdk_draw_polygon(ctxcanvas->wnd, ctxcanvas->gc, TRUE, (GdkPoint*)poly, n);
+ break;
+
+ case CD_CLOSED_LINES:
+ cdgdkCheckSolidStyle(ctxcanvas, 1);
+ gdk_draw_polygon(ctxcanvas->wnd, ctxcanvas->gc, FALSE, (GdkPoint*)poly, n);
+ cdgdkCheckSolidStyle(ctxcanvas, 0);
+ break;
+
+ case CD_OPEN_LINES:
+ cdgdkCheckSolidStyle(ctxcanvas, 1);
+ gdk_draw_lines(ctxcanvas->wnd, ctxcanvas->gc, (GdkPoint*)poly, n);
+ cdgdkCheckSolidStyle(ctxcanvas, 0);
+ break;
+
+ case CD_CLIP:
+ ctxcanvas->clip_rgn = gdk_region_polygon((GdkPoint*)poly, n, ctxcanvas->canvas->fill_mode == CD_EVENODD ? GDK_EVEN_ODD_RULE : GDK_WINDING_RULE);
+ if (ctxcanvas->canvas->clip_mode == CD_CLIPPOLYGON)
+ cdclip(ctxcanvas, CD_CLIPPOLYGON);
+ break;
+
+ case CD_BEZIER:
+ cdSimPolyBezier(ctxcanvas->canvas, poly, n);
+ break;
+
+ case CD_PATH:
+ cdSimPolyPath(ctxcanvas->canvas, poly, n);
+ break;
+ }
}
/******************************************************/