Alpha-Blended-BMP on Panel

Alpha-Blended-BMP on Panel

Postby Otto » Sun Sep 20, 2009 9:49 pm

Is it possible to paint a alpha-blended-bmp on a panel.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: Alpha-Blended-BMP on Panel

Postby ukoenig » 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

Image

Delete the BORDER ( Result )

Image

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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Alpha-Blended-BMP on Panel

Postby Otto » Tue Sep 22, 2009 3:05 pm

Hello Uwe,
thank you for your help.
Now I have bitmaps on the panel.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: Alpha-Blended-BMP on Panel

Postby Otto » Tue Sep 22, 2009 5: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Re: Alpha-Blended-BMP on Panel

Postby Enrico Maria Giordano » Tue Sep 22, 2009 7:06 pm

I think this is normal and expected.

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 104 guests