From 0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 23 Jun 2009 03:18:33 +0000 Subject: *** empty log message *** --- src/win32/cdwin.c | 8 +++++--- src/win32/cdwwmf.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/win32') diff --git a/src/win32/cdwin.c b/src/win32/cdwin.c index 3a71746..ab8d63e 100644 --- a/src/win32/cdwin.c +++ b/src/win32/cdwin.c @@ -25,6 +25,8 @@ typedef BOOL (CALLBACK* AlphaBlendFunc)( HDC hdcDest, BLENDFUNCTION ftn); static AlphaBlendFunc cdwAlphaBlend = NULL; +static void cdgettextsize (cdCtxCanvas* ctxcanvas, const char *s, int *width, int *height); + /* %F Libera memoria e handles alocados pelo driver Windows. */ @@ -967,7 +969,7 @@ static void sTextOutBlt(cdCtxCanvas* ctxcanvas, int px, int py, const char* s, i double cos_teta = cos(teta); double sin_teta = sin(teta); - cdCanvasGetTextSize(ctxcanvas->canvas, s, &w, &h); + cdgettextsize(ctxcanvas, s, &w, &h); wt = w; ht = h; @@ -1163,7 +1165,7 @@ static void cdwCanvasGetTextHeight(cdCanvas* canvas, int x, int y, const char *s int w, h, ascent, height, baseline; int xmin, xmax, ymin, ymax; - cdCanvasGetTextSize(canvas, s, &w, &h); + cdgettextsize(canvas->ctxcanvas, s, &w, &h); cdCanvasGetFontDim(canvas, NULL, &height, &ascent, NULL); baseline = height - ascent; @@ -1247,7 +1249,7 @@ static void cdtext(cdCtxCanvas* ctxcanvas, int x, int y, const char *s) { /* compensa deficiencia do alinhamento no windows */ int off; - cdCanvasGetTextSize(ctxcanvas->canvas, s, NULL, &h); + cdgettextsize(ctxcanvas, s, NULL, &h); off = h/2 - ctxcanvas->font.descent; if (ctxcanvas->canvas->text_orientation != 0) diff --git a/src/win32/cdwwmf.c b/src/win32/cdwwmf.c index 6b47aa5..0571c9f 100644 --- a/src/win32/cdwwmf.c +++ b/src/win32/cdwwmf.c @@ -76,7 +76,7 @@ static void cdcreatecanvas(cdCanvas* canvas, void* data) ctxcanvas->clip_pnt[3].y = ctxcanvas->clip_pnt[2].y = canvas->h - 1; /* Inicializacao de variaveis particulares para o WMF */ - ctxcanvas->filename = strdup(filename); + ctxcanvas->filename = cdStrDup(filename); } static void cdinittable(cdCanvas* canvas) -- cgit v1.2.3