lib/squib/constants.rb in squib-0.0.6 vs lib/squib/constants.rb in squib-0.1.0
- old
+ new
@@ -6,10 +6,11 @@
:align => :left,
:alpha => 1.0,
:angle => 0,
:blend => :none,
:color => :black,
+ :columns => 1,
:default_font => 'Arial 36',
:dir => '_output',
:ellipsize => :end,
:fill_color => '#0000',
:force_id => false,
@@ -25,10 +26,11 @@
:markup => false,
:prefix => 'card_',
:progress_bar => false,
:range => :all,
:rotate => false,
+ :rows => :infinite,
:sheet => 0,
:spacing => 0,
:str => '',
:stroke_color => :black,
:stroke_width => 2.0,
@@ -60,11 +62,11 @@
}
# These are parameters that are intended to be "expanded" across
# range if they are singletons.
#
- # For example, using a different font for each card, using one `text`
+ # For example: using a different font for each card, using one `text` command
#
# key: the internal name of the param (e.g. :files)
# value: the user-facing API key (e.g. file: 'abc.png')
#
# @api private
@@ -104,6 +106,37 @@
:y1 => :y1,
:y2 => :y2,
:y3 => :y3,
:y_radius => :y_radius,
}
+
+ # These parameters are considered for unit conversion
+ #
+ # For example
+ # text str: 'Hello, World', x: '1in'
+ #
+ # key: the internal name of the param (e.g. :circle_radius)
+ # value: the user-facing API key (e.g. radius: '1in')
+ UNIT_CONVERSION_PARAMS = {
+ :circle_radius => :radius,
+ :height => :height,
+ :rect_radius => :radius,
+ :spacing => :spacing,
+ :stroke_width => :stroke_width,
+ :width => :width,
+ :x => :x,
+ :x1 => :x1,
+ :x2 => :x2,
+ :x3 => :x3,
+ :x_radius => :x_radius,
+ :y => :y,
+ :y1 => :y1,
+ :y2 => :y2,
+ :y3 => :y3,
+ :y_radius => :y_radius,
+ }
+
+ # Used for inch-cm conversion
+ # :nodoc:
+ # @api private
+ INCHES_IN_CM = 0.393700787
end