FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Alpha-Blended-BMP on Panel
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Alpha-Blended-BMP on Panel
Posted: Sun Sep 20, 2009 09:49 PM

Is it possible to paint a alpha-blended-bmp on a panel.
Best regards,
Otto

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Alpha-Blended-BMP on Panel
Posted: Tue Sep 22, 2009 10:12 AM
Otto,

A possible Solution, how to do it ( My new VTitle-Painter will be finished in a short Time ) :

For placing the BMP(s), start with a BORDER
( Testalig.prg from FWH\samples\ )

VTitle -> TOP = 0, will be Bottom of Buttonbar



Delete the BORDER ( Result )



Add NOBORDER to the Title, after You are finished, with placing/adjust the BMP-Position inside the Panel.

function Main()
local oBar, oPanel, oLbx, oTabs
local cItem

DEFINE WINDOW oWnd TITLE "FiveWin Automatic Alignment capabilities"

DEFINE BUTTONBAR oBar _3D SIZE 33, 33 OF oWnd

DEFINE BUTTON OF oBar
DEFINE BUTTON OF oBar

#ifndef __XPP__
oPanel = TPanel():New()
#else
oPanel = TPanel():New():_New()
#endif

oWnd:oClient = oPanel // It is the client control of oWnd

@ 0, 0 LISTBOX oLbx VAR cItem ;
ITEMS { "One", "Two", "Three" } SIZE 200, 100 OF oPanel

oPanel:oLeft = oLbx

@ 4, 0 TABS oTabs PROMPT "&One", "&Two", "T&hree" OF oPanel
oPanel:oBottom = oTabs

SET MESSAGE OF oWnd ;
TO "This unique feature saves hours of work!" NOINSET

ACTIVATE WINDOW oWnd ;
ON INIT SHOW_ALPHA(oPanel)

return nil

// ----------------------------

FUNCTION SHOW_ALPHA(oPanel)
LOCAL oBar1

c_path := CURDRIVE() + ":\" + GETCURDIR()
oTextFont := TFont():New("Arial", ,-20,.F.,.T. , , , ,.T. )

@ 20, 250 TITLE oBar1 size 200, 120 of oPanel TRANSPARENT NOBORDER

@ 5, 10 TITLETEXT OF oBar1 TEXT "Test" FONT oTextFont COLOR 128
@ 20, 0 TITLEIMG OF oBar1 BITMAP c_path + "\Images\format.bmp" SIZE 45, 45 REFLEX TRANSPARENT
@ 20, 60 TITLEIMG OF oBar1 BITMAP c_path + "\Images\format.bmp" SIZE 45, 45 REFLEX TRANSPARENT
@ 20, 120 TITLEIMG OF oBar1 BITMAP c_path + "\Images\format.bmp" SIZE 45, 45 REFLEX TRANSPARENT

RETURN ( NIL )

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.
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Alpha-Blended-BMP on Panel
Posted: Tue Sep 22, 2009 03:05 PM

Hello Uwe,
thank you for your help.
Now I have bitmaps on the panel.
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Alpha-Blended-BMP on Panel
Posted: Tue Sep 22, 2009 05:20 PM

Hello Uwe,

did you every measured the speed differences between alpha blended and simple bmps.
Maybe I am doing something wrong but it seems as a simple bmp is painting much quicker.
What is your experiences?
Best regards,
Otto

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Alpha-Blended-BMP on Panel
Posted: Tue Sep 22, 2009 07:06 PM

I think this is normal and expected.

EMG

Continue the discussion