Class: SVGPlot::SVGGradient
- Inherits:
-
SVGTagWithParent
- Object
- SVGTag
- SVGTagWithParent
- SVGPlot::SVGGradient
- Defined in:
- lib/svgplot/plot.rb
Overview
SVG base gradient element, with ruby methods to describe the gradient
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from SVGTagWithParent
Attributes inherited from SVGTag
Instance Method Summary collapse
Methods inherited from SVGTagWithParent
Methods inherited from SVGTag
#append_child, #initialize, #linearGradient, #matrix, #merge_defaults, #method_missing, #path, #pop_defaults, #push_defaults, #radialGradient, #raw, #rotate, #scale, #skewX, #skewY, #spawn_child, #to_s, #translate, #use, #validate_attribute, #validate_attributes, #validate_child_name, #validate_tag, #with_style, #write, #write_points, #write_styles, #write_transforms
Constructor Details
This class inherits a constructor from SVGPlot::SVGTagWithParent
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class SVGPlot::SVGTag
Instance Method Details
#fill ⇒ Object
611 612 613 |
# File 'lib/svgplot/plot.rb', line 611 def fill "url(##{@attributes[:id]})" end |
#stop(offset, color, opacity) ⇒ Object
616 617 618 |
# File 'lib/svgplot/plot.rb', line 616 def stop(offset, color, opacity) append_child(SVGPlot::SVGTag.new("stop", "offset" => offset, "stop-color" => color, "stop-opacity" => opacity)) end |