[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
found problem with applyOp makros (located in drivers/fb.h)
From: Klatt Uwe ####@####.#### Date: 29 Oct 2008 09:57:22 -0000 Message-Id: <A1F06CF959C7E14EAC28F277F3681758057E251625@MAS15.arnstein.miwe.de> Hello, while trying newest cvs I found the following problem: int count = cnt; should be int count = cnt-1; I tested only applyOp4 but applyOp3 and applyOp2 has same code... (I am using mipsel arch with 16bit framebuffer) =============================================== Another small patch: - Adding GetTextAlign() - Adding TA_CENTER and TA_RIGHT textalign flags --- ../src/microwin.cvs/src/mwin/wingdi.c 2005-06-22 00:40:30.000000000 +0200 +++ microwindows-0.91/src/mwin/wingdi.c 2007-02-23 09:21:33.000000000 +0100 @@ -308,6 +308,14 @@ return oldfMode; } +UINT WINAPI +GetTextAlign(HDC hdc) +{ + if(!hdc) + return GDI_ERROR; + return hdc->textalign; +} + /* FIXME: releasing a DC does NOT change back the drawing mode!*/ int WINAPI SetROP2(HDC hdc, int fnDrawMode) @@ -850,6 +857,18 @@ flags |= MWTF_BOTTOM; } else flags |= MWTF_TOP; + if((hdc->textalign & TA_CENTER) == TA_CENTER) { + MWCOORD ph, pw, pb; + GdGetTextSize(hdc->font->pfont, lpszString, cbCount, + &pw, &ph, &pb, flags); + pt.x -= pw/2; + } + else if(hdc->textalign & TA_RIGHT) { + MWCOORD ph, pw, pb; + GdGetTextSize(hdc->font->pfont, lpszString, cbCount, + &pw, &ph, &pb, flags); + pt.x -= pw; + } GdText(hdc->psd, pt.x, pt.y, lpszString, cbCount, flags); return TRUE; Bye Uwe 8-tung! Ab dem 1. Oktober 2008 ?ndern sich die Durchwahl- und Faxnummern Ihrer direkten Ansprechpartner bei MIWE in Arnstein. Vor jede dreistellige Nummer wird dann eine "8" eingef?gt. Bitte ?ndern Sie unsere Kontaktdaten, damit wir auch in Zukunft immer f?r Sie erreichbar sind | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |