Module: SVG::NodeHelpers
Instance Method Summary (collapse)
-
- (SVG::Node) clip_path(properties = {}) {|SVG::Node| ... }
Creates a new clipPath node.
-
- (SVG::Node) g(properties = {}) {|SVG::Node| ... }
Creates a new graphics (`g`) node.
-
- (SVG::Node) path(properties = {}) {|SVG::Node| ... }
Creates a new path node.
-
- (SVG::Node) rect(properties = {}) {|SVG::Node| ... }
Creates a new rect node.
Instance Method Details
- (SVG::Node) clip_path(properties = {}) {|SVG::Node| ... }
Creates a new clipPath node.
9 10 11 12 13 14 15 |
# File 'lib/svg/node_helpers.rb', line 9 def clip_path(properties = {}) SVG::Node.new "clipPath", properties do |clip_path| self << clip_path yield clip_path if block_given? end end |
- (SVG::Node) g(properties = {}) {|SVG::Node| ... }
Creates a new graphics (`g`) node.
22 23 24 25 26 27 28 |
# File 'lib/svg/node_helpers.rb', line 22 def g(properties = {}) SVG::Node.new "g", properties do |g| self << g yield g if block_given? end end |
- (SVG::Node) path(properties = {}) {|SVG::Node| ... }
Creates a new path node.
35 36 37 38 39 40 41 |
# File 'lib/svg/node_helpers.rb', line 35 def path(properties = {}) SVG::Node::Path.new properties do |path| self << path yield path if block_given? end end |
- (SVG::Node) rect(properties = {}) {|SVG::Node| ... }
Creates a new rect node.
48 49 50 51 52 53 54 |
# File 'lib/svg/node_helpers.rb', line 48 def rect(properties = {}) SVG::Node.new "rect", properties do |rect| self << rect yield rect if block_given? end end |