# File lib/clutter/color.rb, line 44 def hls(hue, luminance, saturation, alpha=255) hlsa(hue, luminance, saturation, alpha) end
# File lib/clutter/color.rb, line 48 def hlsa(hue, luminance, saturation, alpha) if respond_to?(:from_hls, true) color = from_hls(hue, luminance, saturation) else color = new color.from_hls(hue, luminance, saturation) end color.alpha = alpha color end
# File lib/clutter/color.rb, line 24 def new(*args) if [Symbol] == args.collect(&:class) name = args[0] get_static(name) else if args.empty? args = [0, 0, 0, 1] unless private_method_defined?(:initialize_alloc) end super(*args) end end
# File lib/clutter/color.rb, line 69 def parse(string) if respond_to?(:from_string, true) succeeded, color = from_string(string) else color = new succeeded = color.from_string(string) end unless succeeded raise ArgumentError, "invalid color string: <#{string}>" end color end
# File lib/clutter/color.rb, line 59 def pixel(pixel) if respond_to?(:from_pixel, true) color = from_pixel(pixel) else color = new color.from_pixel(pixel) end color end
Generated with the Darkfish Rdoc Generator 2.