Transparent Bitmap

Transparent Bitmap

Postby byte-one » Thu Feb 02, 2006 9:30 pm

Hello all,
is there an function to draw an transparent (0,0 pixel or an other is maskcolor) bitmap on screen and printer with resizable dimensions of the bitmap. The function "drawmasked" are not resizeable and on printer are not shown!

Many thanks
Guenther
Mail: office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Transparent Bitmap

Postby Enrico Maria Giordano » Thu Feb 02, 2006 9:40 pm

Try using PalBmpDraw() function for screen.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby byte-one » Thu Feb 02, 2006 10:17 pm

Hello EMG,
"Try using PalBmpDraw() function for screen. "

There is an parameter ltransparent in this function, but no effect!?

MfG
Guenther
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Postby Enrico Maria Giordano » Fri Feb 03, 2006 8:19 am

This is a working sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL hBmp

    DEFINE DIALOG oDlg

    hBmp = READBITMAP( 0, "C:\FWHARBOUR\BITMAPS\OPEN.BMP" )

    ACTIVATE DIALOG oDlg;
             ON PAINT PALBMPDRAW( hDC, 10, 10, hBmp, , , , , .T., oDlg:nClrPane )

    IF hBmp != 0; DELETEOBJECT( hBmp ); ENDIF

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests