diff options
author | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
commit | 0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 (patch) | |
tree | a5d0d3b6c79e967cd4e80c7668b906e8b422f902 /src/win32 | |
parent | 09be96e0606d05b056f82b5f9254208a2d0e4c88 (diff) |
*** empty log message ***
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/cdwin.c | 8 | ||||
-rw-r--r-- | src/win32/cdwwmf.c | 2 |
2 files changed, 6 insertions, 4 deletions
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) |