Some quick documentation

dev
Andy Meneely 2014-07-24 21:37:43 -04:00
parent 11f9d155ab
commit 323e7ec1f5
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,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]
# @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)

View File

@ -2,7 +2,8 @@ module Squib
class Deck class Deck
# Given inches, returns the number of pixels according to the deck's DPI. # 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 # @param [Decimal] n, the number of inches
# @return [Decimal] the number of pixels, according to the deck's DPI # @return [Decimal] the number of pixels, according to the deck's DPI
# @api public # @api public