FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A question about using TEXTOUT on different images.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
A question about using TEXTOUT on different images.
Posted: Wed Jun 25, 2014 06:05 PM
Hello,

using TEXTOUT, painting text on a alphablended image,
I noticed the TEXTCOLOR is painted related to a defined background.
The text itself doesn't use a solid defined textcolor.

the screenshot shows the problem :
A defined red textcolor changes on different positions, mixed with the background-color ( not solid )



On a NON transparent images, the textcolor is painted solid and works fine.

Is there a source-file of TEXTOUT, maybe to change something ?



I added a transparent TTITLE as a test,
but it works only for painting. For saving, I have to paint on < hMemDC >
Maybe it is possible, to paint a TTITLE on hMemDC instead on oDrawImg ???

----------------------------

STATIC FUNCTION CL_DT( hMemDC, nStyle, oDrawImg )
LOCAL hOldFont := SelectObject( hMemDC, oFont3:hFont ), oTitle1

@ aPoints[1][1], aPoints[1][2] TITLE oTitle1 SIZE 300, 50 OF oDrawImg NOBORDER
oTitle1:nShadow := 0
oTitle1:aGrdBack := {}
oTitle1:lTransparent := .T.
@ 1, 1 TITLETEXT OF oTitle1 TEXT TIME() FONT oFont3 COLOR nPenColor


//SetBkMode( hMemDC, 1 )
//SetTextColor( hMemDC, nPenColor )
//TextOut( hMemDC, aPoints[1][1], aPoints[1][2], TIME() )
//SelectObject ( hMemDC, hOldFont )


RETURN( NIL )

----------------------------

The TTITLE - result



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion