Painting text with brushed fonts
#include "fivewin.ch"
function main()
local oWnd, oFont, aPalBmp, pBrush
local cText := "FWH1611" + CRLF + "VERSION" + CRLF + "BRUSHED" + CRLF + "TEXT FONTS"
DEFINE FONT oFont NAME "IMPACT" SIZE 0,-100 bold UNDERLINE
DEFINE WINDOW oWnd TITLE "FWH 16.11 BRUSHED FONTS"
aPalBmp := oWnd:ReadPalBmpEx( "c:\fwh\bitmaps\olga1.jpg", nil, .t. )
pBrush := GDIP_IMAGEBRUSH( aPalBmp[ 1 ] )
oWnd:nHeight := 600
oWnd:nWidth := 760
ACTIVATE WINDOW oWnd CENTERED ;
ON PAINT oWnd:SayText( cText, nil, "R", oFont, pBrush )
GDIPLUSDELETEBRUSH( pBrush )
PalBmpFree( aPalBmp )
RELEASE FONT oFont
return nil
HB_FUNC( GDIP_SETWRAPTEXTUREBRUSH )
{
TextureBrush * Brush = ( TextureBrush * ) hb_parptr( 1 );
int ntype = hb_parni( 2 ) ;
if ( ntype == 0 )
Brush->SetWrapMode( WrapModeTile ) ;
if ( ntype == 1 )
Brush->SetWrapMode( WrapModeTileFlipX ) ;
if ( ntype == 2 )
Brush->SetWrapMode( WrapModeTileFlipY ) ;
if ( ntype == 3 )
Brush->SetWrapMode( WrapModeTileFlipXY ) ;
if ( ntype == 4 )
Brush->SetWrapMode( WrapModeClamp ) ;
}
....
aPalBmp := oWnd:ReadPalBmpEx( "c:\fwh\bitmaps\olga1.jpg", nil, .t. )
pBrush := GDIP_IMAGEBRUSH( aPalBmp[ 1 ] )
GDIP_SETWRAPTEXTUREBRUSH( pBrush , 1 )
.....
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 86 guests