Gradientfill question

Gradientfill question

Postby Rick Lipkin » Wed May 20, 2009 12:11 am

To All

Started testing with the GradientFill function :

Code: Select all  Expand view

ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, { { 0.50, 16054371, 8388608 } } ) ;
 


The color select is a nice shade of blue .. I take it {0.50, 16054371, 8388608 } is the color combinations 50\50 ?? Just curious what the values 16054371, 8388608 are and how I can get a nice Grey\silver combination ??

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Gradientfill question

Postby FranciscoA » Wed May 20, 2009 3:58 am

Hi, Rick
Maybe you want to use KsColorPick.Exe. It is for free.
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Gradientfill question

Postby ukoenig » Wed May 20, 2009 7:58 am

Hello Rick,

You can use one of my Tools for Gradient-painting.
A color-picker doesn't show a gradient, only 1 color.
If You can wait, today I put the new release of the xBrowse-tools in the forum.
In the meantime, You can use the old release, if You like ( search for xBrowsetools ).
There You can find a section < Dialog > where You can paint gradients.
With the Slider, You can move the 2. Gradient-color for special effect.
Inside the < Backgrondstyle-section > You can select Horizontal or Vertical.
You can create the Gradients Header and Footer for xBrowse and use the same results for the dialog.
The created code, You can copy and past to Your Prg-file.

Image

Best Regards
Uwe :lol:
Last edited by ukoenig on Wed May 20, 2009 1:33 pm, 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 question

Postby Rick Lipkin » Wed May 20, 2009 12:51 pm

Uwe

I have searched the forum and looked at many of your examples .. I like the beige\pearl gradient on the right side of your example ..

viewtopic.php?f=3&t=15335&p=79485&hilit=gradientfill#p79485

From what I can see .. there is only a light and dark nRGB ( two parameters ) .. but in researching this further .. it appears you can create multiple gradients with 4 parameters ??

What is the gradientfill() parameters you used in the above topic ??

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Gradientfill question

Postby ukoenig » Wed May 20, 2009 1:27 pm

Hello Rick,

Inside the tools there is a gradient-painter-section.
There You can paint a gradient, resize and save the result as a BMP-file.
The saved gradient-BMP you can use as Browser-Brush, include on a Background-image and so on.
I used the saved BMP as a Bar-background on the right side of the Window-background-image.

The result :
--------------
aGrad := { { 1.0, 16777215, 5081712 },{ 1.0, 5081712, 16777215 } }
The value 1 means : color1 = left, color2 = right.
The value 0.50 means : color1 = left, color2 = centered, color1 = right ( move 2. color-position )
How to use a Grad :
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .F. ) // Vertical
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .T. ) // Horizontal

Image

Best Regards
Uwe :lol:
Last edited by ukoenig on Wed May 20, 2009 1:51 pm, edited 3 times 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 question

Postby FranciscoA » Wed May 20, 2009 1:28 pm

Yes, I forgot it. xBrowTools. Excelent tool.
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Gradientfill question

Postby Rick Lipkin » Wed May 20, 2009 3:27 pm

Uwe

Thank you for the definition of the gradient parameters ..
Code: Select all  Expand view

aGrad := { { 1.0, 16777215, 5081712 },{ 1.0, 5081712, 16777215 } }
The value 1 means : color1 = left, color2 = right.
The value 0.50 means : color1 = left, color2 = centered, color1 = right ( move 2. color-position )
How to use a Grad :
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .F. ) // Vertical
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .T. ) // Horizontal
 

I am a LOT closer than I was and gettting closer to that 'champagne' color gradient I am looking for. Let me know when you modify your tool .. I want to take a look.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Gradientfill question

Postby FranciscoA » Wed May 20, 2009 7:22 pm

Rick:
Do You can load an image containing the color you want?
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Gradientfill question

Postby Rick Lipkin » Wed May 20, 2009 7:56 pm

Francisco

It is not so much loading an IMAGE as just taking a Dialog and painging the GradientFill color .. Like this:

Code: Select all  Expand view

aGrad := { { 1.0, 16777215, nRGB(4,53,107) },{ 1.0, nRGB(4,53,107), 16777215 } }

DEFINE DIALOG oDlg RESOURCE "PCAS" ;
       TITLE cTITLE

...
...

ACTIVATE DIALOG oDlg ;
         ON PAINT GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, .T. )
 


Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Gradientfill question

Postby FranciscoA » Wed May 20, 2009 10:55 pm

Rick:
Sorry for my bad English. I understood that you wanted to find one color gradient, and that is why I asked you to display any image that I could identify the color you want, and see if I could send you the RGBS or equivalence. You speak Spanish?
Greetings
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Gradientfill question

Postby Rick Lipkin » Wed May 20, 2009 11:58 pm

Fransisco

I found your "KsColorPick.Exe" and downloaded it and started using it.. Very useful for pointing and clicking on 'something' and the tool telling you what the RGB is ..

I have been playing with it all afternoon .. I must admit .. the more I play with gradientfill .. the more 'trite' ( gauty ) my application becomes.

I am going to Google a search on 'gradientfill color combinations' and see what I find .. it seems all the colors I pick are just not my kinda conservative.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 114 guests