[teklib-general] teklib: Changes merged in from tekUI: Visual API, Display driver...
Timm S. Mueller
tmueller at neoscientists.org
Thu May 7 14:51:05 CEST 2009
details: http://hg.teklib.org/teklib/rev/7256b8f1b5f9
changeset: 261:7256b8f1b5f9
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Thu May 07 14:49:07 2009 +0200
description:
Changes merged in from tekUI: Visual API, Display drivers: Removed background
pen argument from TVisualText()
diffs (truncated from 233 to 100 lines):
diff -r ba451747ca32 -r 7256b8f1b5f9 src/display_directfb/display_dfb_api.c
--- a/src/display_directfb/display_dfb_api.c Fri May 01 19:22:06 2009 +0200
+++ b/src/display_directfb/display_dfb_api.c Thu May 07 14:49:07 2009 +0200
@@ -740,22 +740,12 @@
TINT w;
TINT h = ((struct FontNode *) v->curfont)->height;
struct DFBPen *fgpen = (struct DFBPen *) req->tvr_Op.Text.FgPen;
- struct DFBPen *bgpen = (struct DFBPen *) req->tvr_Op.Text.BgPen;
TINT ascent = ((struct FontNode *) v->curfont)->ascent;
IDirectFBFont *f = ((struct FontNode *) v->curfont)->font;
-
f->GetStringWidth(f, text, len, &w);
-
- if ((TVPEN) bgpen != TVPEN_UNDEFINED)
- {
- setfgpen(mod, v, (TVPEN) bgpen);
- v->winsurface->FillRectangle(v->winsurface, x, y, w, h);
- }
-
- setbgpen(mod, v, (TVPEN) bgpen);
setfgpen(mod, v, (TVPEN) fgpen);
-
- v->winsurface->DrawString(v->winsurface, text, len, x, y+ascent, DSTF_LEFT);
+ v->winsurface->DrawString(v->winsurface, text, len, x, y + ascent,
+ DSTF_LEFT);
}
/*****************************************************************************/
diff -r ba451747ca32 -r 7256b8f1b5f9 src/display_windows/display_win_api.c
--- a/src/display_windows/display_win_api.c Fri May 01 19:22:06 2009 +0200
+++ b/src/display_windows/display_win_api.c Thu May 07 14:49:07 2009 +0200
@@ -155,6 +155,8 @@
TUnlock(mod->fbd_Lock);
+ SetBkMode(win->fbv_HDC, TRANSPARENT);
+
ShowWindow(win->fbv_HWnd, SW_SHOWNORMAL);
UpdateWindow(win->fbv_HWnd);
@@ -175,7 +177,7 @@
imsg->timsg_Height = win->fbv_Height;
fb_sendimsg(mod, win, imsg);
}
-
+
return TTRUE;
}
@@ -877,21 +879,9 @@
TUINT x = req->tvr_Op.Text.X;
TUINT y = req->tvr_Op.Text.Y;
struct FBPen *fgpen = (struct FBPen *) req->tvr_Op.Text.FgPen;
- struct FBPen *bgpen = (struct FBPen *) req->tvr_Op.Text.BgPen;
TSTRPTR latin = fb_utf8tolatin(mod, text, len, &len);
-
SetTextColor(win->fbv_HDC, fgpen->col);
- if ((TINTPTR) bgpen != TVPEN_UNDEFINED)
- {
- SetBkColor(win->fbv_HDC, bgpen->col);
- SetBkMode(win->fbv_HDC, OPAQUE);
- ExtTextOut(win->fbv_HDC, x, y, ETO_OPAQUE, NULL, latin, len, NULL);
- }
- else
- {
- SetBkMode(win->fbv_HDC, TRANSPARENT);
- TextOut(win->fbv_HDC, x, y, latin, len);
- }
+ TextOut(win->fbv_HDC, x, y, latin, len);
win->fbv_Dirty = TTRUE;
}
diff -r ba451747ca32 -r 7256b8f1b5f9 src/display_x11/display_x11_api.c
--- a/src/display_x11/display_x11_api.c Fri May 01 19:22:06 2009 +0200
+++ b/src/display_x11/display_x11_api.c Thu May 07 14:49:07 2009 +0200
@@ -743,56 +743,25 @@
TINT len = req->tvr_Op.Text.Length;
TUINT x = req->tvr_Op.Text.X;
TUINT y = req->tvr_Op.Text.Y;
-
struct X11Pen *fgpen = (struct X11Pen *) req->tvr_Op.Text.FgPen;
- struct X11Pen *bgpen = (struct X11Pen *) req->tvr_Op.Text.BgPen;
-
setfgpen(mod, v, (TVPEN) fgpen);
- if ((TVPEN) bgpen == TVPEN_UNDEFINED)
+ #if defined(ENABLE_XFT)
+ if (mod->x11_use_xft)
{
- #if defined(ENABLE_XFT)
- if (mod->x11_use_xft)
- {
- XftFont *f = ((struct FontNode *) v->curfont)->xftfont;
- (*mod->x11_xftiface.XftDrawStringUtf8)(v->draw, &fgpen->xftcolor,
- f, x, y + f->ascent, (FcChar8 *)text, len);
- }
- else
- #endif
- {
- TSTRPTR latin = x11_utf8tolatin(mod, text, len, &len);
More information about the teklib-general
mailing list