Class: DYI::Drawing::ColorEffect::GradientStop
- Inherits:
-
Object
- Object
- DYI::Drawing::ColorEffect::GradientStop
- Defined in:
- lib/dyi/drawing/color_effect.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(offset, options = {}) ⇒ GradientStop
constructor
A new instance of GradientStop.
- #write_as(formatter, io = $>) ⇒ Object
Constructor Details
#initialize(offset, options = {}) ⇒ GradientStop
Returns a new instance of GradientStop.
216 217 218 219 220 |
# File 'lib/dyi/drawing/color_effect.rb', line 216 def initialize(offset, ={}) @offset = offset.to_f self.color = [:color] self.opacity = [:opacity] end |
Instance Attribute Details
#color ⇒ Object
214 215 216 |
# File 'lib/dyi/drawing/color_effect.rb', line 214 def color @color end |
#offset ⇒ Object (readonly)
214 215 216 |
# File 'lib/dyi/drawing/color_effect.rb', line 214 def offset @offset end |
#opacity ⇒ Object
214 215 216 |
# File 'lib/dyi/drawing/color_effect.rb', line 214 def opacity @opacity end |
Instance Method Details
#write_as(formatter, io = $>) ⇒ Object
232 233 234 |
# File 'lib/dyi/drawing/color_effect.rb', line 232 def write_as(formatter, io=$>) formatter.write_gradient_stop(self, io) end |