lib/squib/constants.rb in squib-0.5.1 vs lib/squib/constants.rb in squib-0.6.0
- old
+ new
@@ -4,18 +4,20 @@
# @api public
SYSTEM_DEFAULTS = {
:align => :left,
:alpha => 1.0,
:angle => 0,
+ :angle_range => (Math::PI / -4.0)..(Math::PI / 4),
:blend => :none,
:color => :black,
:columns => 5,
:count_format => '%02d',
:cx1 => 0,
:cx2 => 0,
:cy1 => 0,
:cy2 => 0,
+ :data => nil,
:default_font => 'Arial 36',
:dir => '_output',
:dx => 0, # delta
:dy => 0, # delta
:ellipsize => :end,
@@ -26,17 +28,20 @@
:font_size => nil,
:format => :png,
:gap => 0,
:height => :native,
:hint => :off,
+ :inner_radius => 50,
:img_dir => '.',
:justify => false,
:key => '*',
:margin => 75,
:markup => false,
:mask => nil,
+ :n => 5,
:offset => 1.1,
+ :outer_radius => 100,
:prefix => 'card_',
:progress_bar => false,
:quotes => :dumb,
:reflect_offset => 15,
:reflect_percent => 0.25,
@@ -65,41 +70,10 @@
:y2 => 150,
:y3 => 150,
:y_radius => 0,
}
- # Squib's configuration defaults
- #
- # @api public
- CONFIG_DEFAULTS = {
- 'antialias' => 'best',
- 'backend' => 'memory',
- 'count_format' => SYSTEM_DEFAULTS[:count_format],
- 'custom_colors' => {},
- 'dir' => SYSTEM_DEFAULTS[:dir],
- 'dpi' => 300,
- 'hint' => :none,
- 'img_dir' => '.',
- 'progress_bar' => false,
- 'ldquote' => "\u201C", # UTF8 chars
- 'rdquote' => "\u201D",
- 'lsquote' => "\u2018",
- 'rsquote' => "\u2019",
- 'em_dash' => "\u2014",
- 'en_dash' => "\u2013",
- 'ellipsis' => "\u2026",
- 'smart_quotes' => true,
- }
-
- #Translate the hints to the methods.
- ANTIALIAS_OPTS = {
- 'best' => 'subpixel',
- 'good' => 'gray',
- 'fast' => 'gray',
- 'gray' => 'gray',
- 'subpixel' => 'subpixel'
- }
# 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` command
#
@@ -126,20 +100,24 @@
:force_svgid => :force_id,
:font => :font,
:font_size => :font_size,
:height => :height,
:hint => :hint,
+ :inner_radius => :inner_radius,
:justify => :justify,
:layout => :layout,
:markup => :markup,
:mask => :mask,
+ :n => :n,
+ :outer_radius => :outer_radius,
:quotes => :quotes,
:rect_radius => :radius,
:spacing => :spacing,
:str => :str,
:stroke_color => :stroke_color,
:stroke_width => :stroke_width,
+ :svgdata => :data,
:svgid => :id,
:valign => :valign,
:width => :width,
:wrap => :wrap,
:x => :x,
@@ -169,10 +147,12 @@
:cy2 => :cy2,
:dx => :dx, # delta
:dy => :dx, # delta
:gap => :gap,
:height => :height,
+ :inner_radius => :inner_radius,
:margin => :margin,
+ :outer_radius => :outer_radius,
:paper_width => :width,
:paper_height => :height,
:rect_radius => :radius,
:spacing => :spacing,
:stroke_width => :stroke_width,