Browse Source

Some quick documentation

dev
Andy Meneely 12 years ago
parent
commit
323e7ec1f5
  1. 1
      lib/squib/api/image.rb
  2. 1
      lib/squib/api/units.rb

1
lib/squib/api/image.rb

@ -27,6 +27,7 @@ module Squib
# @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 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]
# @api public
def svg(range: :all, file: nil, id: nil, x: 0, y: 0, width: :native, height: :native)
range = rangeify(range)

1
lib/squib/api/units.rb

@ -3,6 +3,7 @@ module Squib
# Given inches, returns the number of pixels according to the deck's DPI.
#
# @example inches(2.5) # 750px for 300 dpi
# @param [Decimal] n, the number of inches
# @return [Decimal] the number of pixels, according to the deck's DPI
# @api public

Loading…
Cancel
Save