GradientFill()

GradientFill()

Postby Bayron » Mon Feb 14, 2011 11:39 pm

Code: Select all  Expand view
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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: GradientFill()

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

Image

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 :lol:
Last edited by ukoenig on Tue Feb 15, 2011 12:53 am, edited 1 time in total.
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: GradientFill()

Postby Bayron » 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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: GradientFill()

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

Image

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

backg9.jpg
Image

backg10.jpg
Image

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: GradientFill()

Postby Bayron » Tue Feb 15, 2011 2: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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: GradientFill()

Postby mosh1 » Thu Dec 15, 2011 7:36 pm

Bayron wrote:
Code: Select all  Expand view
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? Image
mosh1
 
Posts: 129
Joined: Sun Oct 09, 2011 3:50 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests