Class: Cairo::Color::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cairo/color.rb

Direct Known Subclasses

CMYK, HSV, RGB

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(a) ⇒ Base

Returns a new instance of Base.



57
58
59
60
# File 'lib/cairo/color.rb', line 57

def initialize(a)
  assert_in_range(a, "alpha channel")
  @alpha = a
end

Instance Attribute Details

#alphaObject Also known as: a

Returns the value of attribute alpha.



52
53
54
# File 'lib/cairo/color.rb', line 52

def alpha
  @alpha
end