class CTioga2::Graphics::Styles::TwoPointGradient
A color gradient with two points
todo There could be many more
@todo This will have to be replaced by a real color map based on what
Public Class Methods
new(s,e)
click to toggle source
# File lib/ctioga2/graphics/styles/gradients.rb, line 43 def initialize(s,e) warn { "This class shouldn't be used anymore at #{caller.inspect}" } @start = s @end = e end
Public Instance Methods
color(x)
click to toggle source
Returns the color for the given value of x (between 0 and 1)
# File lib/ctioga2/graphics/styles/gradients.rb, line 50 def color(x) return Utils::mix_objects(@end,@start, x) end