diff options
Diffstat (limited to 'src/drv/cdirgb.c')
-rw-r--r-- | src/drv/cdirgb.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/drv/cdirgb.c b/src/drv/cdirgb.c index d9dd6a8..fa45f97 100644 --- a/src/drv/cdirgb.c +++ b/src/drv/cdirgb.c @@ -1908,7 +1908,7 @@ static void cdcreatecanvasDB(cdCanvas* canvas, cdCanvas* canvas_dbuffer) { char rgbdata[100]; sprintf(rgbdata, "%dx%d -r%g", canvas_dbuffer->w, canvas_dbuffer->h, canvas_dbuffer->xres); - cdcreatecanvas(canvas, rgbdata); + cdcreatecanvas(canvas, rgbdata); /* the double buffer image will be internally allocated as the canvas RGB image itself */ if (canvas->ctxcanvas) canvas->ctxcanvas->canvas_dbuffer = canvas_dbuffer; } @@ -1941,34 +1941,12 @@ static int cdactivateDB(cdCtxCanvas *ctxcanvas) } /* remove the old image and canvas */ - cdkillcanvas(old_ctxcanvas); + cdkillcanvas(old_ctxcanvas); /* the double buffer image is the canvas itself */ ctxcanvas = canvas->ctxcanvas; /* update canvas attributes */ - if (canvas->cxBackground) canvas->cxBackground(ctxcanvas, canvas->background); - if (canvas->cxForeground) canvas->cxForeground(ctxcanvas, canvas->foreground); - if (canvas->cxBackOpacity) canvas->cxBackOpacity(ctxcanvas, canvas->back_opacity); - if (canvas->cxWriteMode) canvas->cxWriteMode(ctxcanvas, canvas->write_mode); - if (canvas->cxLineStyle) canvas->cxLineStyle(ctxcanvas, canvas->line_style); - if (canvas->cxLineWidth) canvas->cxLineWidth(ctxcanvas, canvas->line_width); - if (canvas->cxLineCap) canvas->cxLineCap(ctxcanvas, canvas->line_cap); - if (canvas->cxLineJoin) canvas->cxLineJoin(ctxcanvas, canvas->line_join); - if (canvas->cxHatch) canvas->cxHatch(ctxcanvas, canvas->hatch_style); - if (canvas->stipple && canvas->cxStipple) canvas->cxStipple(ctxcanvas, canvas->stipple_w, canvas->stipple_h, canvas->stipple); - if (canvas->pattern && canvas->cxPattern) canvas->cxPattern(ctxcanvas, canvas->pattern_w, canvas->pattern_h, canvas->pattern); - if (canvas->cxInteriorStyle) canvas->cxInteriorStyle(ctxcanvas, canvas->interior_style); - if (canvas->native_font[0] && canvas->cxNativeFont) - canvas->cxNativeFont(ctxcanvas, canvas->native_font); - else if (canvas->cxFont) canvas->cxFont(ctxcanvas, canvas->font_type_face, canvas->font_style, canvas->font_size); - if (canvas->cxTextAlignment) canvas->cxTextAlignment(ctxcanvas, canvas->text_alignment); - if (canvas->cxTextOrientation) canvas->cxTextOrientation(ctxcanvas, canvas->text_orientation); - if (canvas->use_matrix && canvas->cxTransform) canvas->cxTransform(ctxcanvas, canvas->matrix); - if (canvas->clip_mode == CD_CLIPAREA && canvas->cxClipArea) canvas->cxClipArea(ctxcanvas, canvas->clip_rect.xmin, canvas->clip_rect.xmax, canvas->clip_rect.ymin, canvas->clip_rect.ymax); - if (canvas->clip_mode == CD_CLIPAREA && canvas->cxFClipArea) canvas->cxFClipArea(ctxcanvas, canvas->clip_frect.xmin, canvas->clip_frect.xmax, canvas->clip_frect.ymin, canvas->clip_frect.ymax); - if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_poly) canvas->cxPoly(ctxcanvas, CD_CLIP, canvas->clip_poly, canvas->clip_poly_n); - if (canvas->clip_mode == CD_CLIPPOLYGON && canvas->clip_fpoly) canvas->cxFPoly(ctxcanvas, CD_CLIP, canvas->clip_fpoly, canvas->clip_poly_n); - if (canvas->clip_mode != CD_CLIPOFF && canvas->cxClip) canvas->cxClip(ctxcanvas, canvas->clip_mode); + cdUpdateAttributes(canvas); } return CD_OK; |