Browse Source

More documentation to satisfy Inch

dev
Andy Meneely 12 years ago
parent
commit
d36907b74c
  1. 5
      lib/squib/api/image.rb

5
lib/squib/api/image.rb

@ -18,6 +18,9 @@ module Squib
end end
# Renders an entire svg file at the given location. Uses the SVG-specified units and DPI to determine the pixel width and height. # Renders an entire svg file at the given location. Uses the SVG-specified units and DPI to determine the pixel width and height.
# @example
# svg 1..2, 'icon.svg', '#stone', x: 50, y:50
#
# See {file:samples/load-images.rb samples/load-images.rb} and {file:samples/tgc-overlay.rb samples/tgc-overlay.rb} as examples. # See {file:samples/load-images.rb samples/load-images.rb} and {file:samples/tgc-overlay.rb samples/tgc-overlay.rb} as examples.
# #
# @param range: the range of cards over which this will be rendered. See {file:API.md#label-Specifying+Ranges Specifying Ranges} # @param range: the range of cards over which this will be rendered. See {file:API.md#label-Specifying+Ranges Specifying Ranges}
@ -27,7 +30,7 @@ module Squib
# @param y: the y-coordinate to place # @param y: the y-coordinate to place
# @param width: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. # @param width: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document.
# @param height: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. # @param height: the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document.
# @return [nil] # @return [nil] essentially a void method
# @api public # @api public
def svg(range: :all, file: nil, id: nil, x: 0, y: 0, width: :native, height: :native) def svg(range: :all, file: nil, id: nil, x: 0, y: 0, width: :native, height: :native)
range = rangeify(range) range = rangeify(range)

Loading…
Cancel
Save