FWH 16.11 Texured Fonts
Posted: Thu Nov 24, 2016 5:53 am
www.FiveTechSoft.com
https://forums.fivetechsoft.com/
Code: Select all
#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
Code: Select all
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 ) ;
}
Code: Select all
....
aPalBmp := oWnd:ReadPalBmpEx( "c:\fwh\bitmaps\olga1.jpg", nil, .t. )
pBrush := GDIP_IMAGEBRUSH( aPalBmp[ 1 ] )
GDIP_SETWRAPTEXTUREBRUSH( pBrush , 1 )
.....