diff options
Diffstat (limited to 'src/gdk')
-rw-r--r-- | src/gdk/cdgdk.c | 94 | ||||
-rw-r--r-- | src/gdk/cdgdkclp.c | 2 | ||||
-rw-r--r-- | src/gdk/cdgdkdbuf.c | 3 | ||||
-rw-r--r-- | src/gdk/cdgdkimg.c | 2 | ||||
-rw-r--r-- | src/gdk/cdgdknative.c | 2 |
5 files changed, 53 insertions, 50 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; + } } /******************************************************/ diff --git a/src/gdk/cdgdkclp.c b/src/gdk/cdgdkclp.c index 22e7690..3eabc54 100644 --- a/src/gdk/cdgdkclp.c +++ b/src/gdk/cdgdkclp.c @@ -115,7 +115,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdClipboardContext = { - CD_CAP_ALL & ~(CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | CD_CAP_FONTDIM | CD_CAP_TEXTSIZE), + CD_CAP_ALL & ~(CD_CAP_GETIMAGERGB | CD_CAP_IMAGESRV | CD_CAP_FONTDIM | CD_CAP_TEXTSIZE ), /* same as CD_MF */ 0, cdcreatecanvas, cdinittable, diff --git a/src/gdk/cdgdkdbuf.c b/src/gdk/cdgdkdbuf.c index aa8d587..b399cbe 100644 --- a/src/gdk/cdgdkdbuf.c +++ b/src/gdk/cdgdkdbuf.c @@ -147,8 +147,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdDBufferContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | - CD_CAP_FPRIMTIVES ), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_PATH | CD_CAP_BEZIER | CD_CAP_FPRIMTIVES ), 0, cdcreatecanvas, cdinittable, diff --git a/src/gdk/cdgdkimg.c b/src/gdk/cdgdkimg.c index 0c5e5dd..4b4475b 100644 --- a/src/gdk/cdgdkimg.c +++ b/src/gdk/cdgdkimg.c @@ -30,7 +30,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdImageContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES | CD_CAP_PATH | CD_CAP_BEZIER ), 0, cdcreatecanvas, cdinittable, diff --git a/src/gdk/cdgdknative.c b/src/gdk/cdgdknative.c index 9f0c5ed..8865d7e 100644 --- a/src/gdk/cdgdknative.c +++ b/src/gdk/cdgdknative.c @@ -95,7 +95,7 @@ static void cdinittable(cdCanvas* canvas) static cdContext cdNativeWindowContext = { - CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES ), + CD_CAP_ALL & ~(CD_CAP_PLAY | CD_CAP_YAXIS | CD_CAP_FPRIMTIVES | CD_CAP_PATH | CD_CAP_BEZIER ), 1, cdcreatecanvas, cdinittable, |