FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GradientFill()
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
GradientFill()
Posted: Mon Feb 14, 2011 11:39 PM
Code (fw): Select all Collapse
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, ;
                                   { { 0.5, 8388608,16117445 }, { 0.5, 16117445, 8388608 } }, .T. )


The anterior code, fills a Dialog from Top to Bottom and Bottom to top with a Gradient...(Sample by Daniel)

Is there a way to do it Top to Bottom, Bottom to top, Left to Right and Right to Left simultaneously???

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: GradientFill()
Posted: Tue Feb 15, 2011 12:42 AM
Hello Bayron,

True and False defines the Direction.

GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, ;
{ { 0.5, 8388608,16117445 }, { 0.5, 16117445, 8388608 } }, .T. )

GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, ;
{ { 0.5, 8388608,16117445 }, { 0.5, 16117445, 8388608 } }, .F. )

You can test all Settings with the Tool :



I just noticed, the darkblue-area ( Bottom and Right ) is different using the same Values.
Maybe the Vertical Dialog-Height must be adjusted like oDlg:nHeight-20 because of Dialog-Title,
to get the same Gradient-effect.
The Screenshot shows a Test on the Main-window. I will check both Window and Dialog.

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: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: GradientFill()
Posted: Tue Feb 15, 2011 12:52 AM

Uwe, Thanks for the answer, I am aware of the clause .T. or .F., but what I want is a gradient from both directions simultaneously. I know we have a CircleGradient(), I will like kind of a SquareGradient()

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: GradientFill()
Posted: Tue Feb 15, 2011 12:59 PM
Hello Bayron,

there are different Styles and Effects of Square Gradients.
Paint a Gradient-Square of Your Taste and save it as a JPG.

Just a sample :



For a Test, save these Images to Your \Bitmap - Directory
and Select them as Dialog-Image-Background

backg9.jpg


backg10.jpg


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: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: GradientFill()
Posted: Tue Feb 15, 2011 02:54 PM

That is exactly what I want, but I need to do that programaticly, because I want to get rid of external bitmaps or resources...

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 129
Joined: Sun Oct 09, 2011 03:50 PM
Re: GradientFill()
Posted: Thu Dec 15, 2011 07:36 PM
Bayron wrote:
Code (fw): Select all Collapse
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, ;
                                   { { 0.5, 8388608,16117445 }, { 0.5, 16117445, 8388608 } }, .T. )


The anterior code, fills a Dialog from Top to Bottom and Bottom to top with a Gradient...(Sample by Daniel)

Is there a way to do it Top to Bottom, Bottom to top, Left to Right and Right to Left simultaneously???



Where GradientFill() can be found?

Continue the discussion