A Question about Gradient-Calculation.

A Question about Gradient-Calculation.

Postby ukoenig » Fri Sep 04, 2009 10:37 pm

Hello,

Working with Gradients, I noticed inside my Tools and also in the
new xbrowse-Gradient-painting, the result of the centered Color-calculation
is not linear.

Image

Just 1 % changing from 45% to 44%, shows a big Difference.
To make this Effect better visible, Start- and End-Color should have the same Value.
In this Example, the yellow Center-Color must move in equal steps to left or right.
The Center-Color spreads with certain Values.
Image

is there a Solution, to solve this problem ?

Best Regards
Uwe :lol:
Last edited by ukoenig on Fri Sep 11, 2009 1:43 am, edited 2 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: A Question about Gradient-Calculation.

Postby Antonio Linares » Fri Sep 11, 2009 1:05 am

Uwe,

You can review the source code of GradientFill() in FWH\source\bar.prg (surely we will migrate it from there to a different module soon).

Wiki docs for GradientFill():
http://wiki.fivetechsoft.com/doku.php?id=fivewin_function_gradientfill
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: A Question about Gradient-Calculation.

Postby ukoenig » Fri Sep 11, 2009 1:47 am

Antonio,

I corrected the wrong Screenshots, to explain the Problem.
They have been lost, overwritten with different ones.

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests