Is it possible to paint a alpha-blended-bmp on a panel.
Best regards,
Otto
Alpha-Blended-BMP on Panel
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Alpha-Blended-BMP on Panel
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
Re: Alpha-Blended-BMP on Panel
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](http://www.pflegeplus.com/pictures/panelbmp0.jpg)
Delete the BORDER ( Result )
![Image](http://www.pflegeplus.com/pictures/panelbmp1.jpg)
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![Laughing :lol:](./images/smilies/icon_lol.gif)
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](http://www.pflegeplus.com/pictures/panelbmp0.jpg)
Delete the BORDER ( Result )
![Image](http://www.pflegeplus.com/pictures/panelbmp1.jpg)
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
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: Alpha-Blended-BMP on Panel
Hello Uwe,
thank you for your help.
Now I have bitmaps on the panel.
Best regards,
Otto
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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: Alpha-Blended-BMP on Panel
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
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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact: