# Renders an entire svg file at the given location. Uses the SVG-specified units and DPI to determine the pixel width and height.
#
# See {file:samples/load-images.rb samples/load-images.rb} and {file:samples/tgc-overlay.rb samples/tgc-overlay.rb} as examples.
# @example
# @example
# svg 1..2, 'icon.svg', '#stone', x: 50, y:50
#
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
#
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
# Renders a string at a given location, width, alignment, font, etc.
#
# Unix-like newlines are interpreted even on Windows.
# Unix-like newlines are interpreted even on Windows.
# See the {file:samples/text-options.rb samples/text.rb} for a lengthy example.
#
# @example
# @example
# text str: 'hello'
# text str: 'hello', x: 50, y:50, align: center
#
#
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
#
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
# @option opts str [String, Array] ('') the string to be rendered. Must support `#to_s`. If the card responds to `#each`, it's mapped out one at a time across the cards.
# @option opts font [String] (Arial 36 or whatever was set with `set`) the Font description string, including family, styles, and size.
# (e.g. `'Arial bold italic 12'`)
# For the official documentation, see the [Pango docs](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style).
# For the official documentation, see the [Pango docs](http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style).
# This [description](http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html) is also quite good.
# See the {file:samples/text-options.rb samples/text.rb} as well.
# @option opts font_size [Integer] (nil) an override of font string description, for scaling the font according to the size of the string
@ -27,15 +27,15 @@ module Squib
# @option opts width [Integer, :native] (:native) the width of the box the string will be placed in. Stretches to the content by default.
# @option opts height [Integer, :native] the height of the box the string will be placed in. Stretches to the content by default.
# @option opts layout [String, Symbol] (nil) entry in the layout to use as defaults for this command. See {file:README.md#Custom_Layouts Custom Layouts}
# @option opts wrap [:none, :word, :char, :word_char, true, false] (:word_char) When height is set, determines the behavior of how the string wraps. The `:word_char` option will break at words, but then fall back to characters when the word cannot fit. #
# @option opts wrap [:none, :word, :char, :word_char, true, false] (:word_char) When height is set, determines the behavior of how the string wraps. The `:word_char` option will break at words, but then fall back to characters when the word cannot fit. #
# Options are `:none, :word, :char, :word_char`. Also: `true` is the same as `:word_char`, `false` is the same as `:none`. Default `:word_char`
# @option opts spacing [Integer] (0) Adjust the spacing when the text is multiple lines. No effect when the text does not wrap.
# @option opts align [:left, right, :center] (:left) The alignment of the text
# @option opts justify [Boolean] (false) toggles whether or not the text is justified or not.
# @option opts justify [Boolean] (false) toggles whether or not the text is justified or not.
# @option opts valign [:top, :middle, :bottom] (:top) When width and height are set, align text vertically according to the ink extents of the text.
# @option opts ellipsize [:none, :start, :middle, :end, true, false] (:end) When width and height are set, determines the behavior of overflowing text. Also: `true` maps to `:end` and `false` maps to `:none`. Default `:end`
# @option opts angle [FixNum] (0) Rotation of the text in radians.
# @option opts hint [String] (:nil) draw a rectangle around the text with the given color. Overrides global hints (see {Deck#hint}).
# @option opts angle [FixNum] (0) Rotation of the text in radians.
# @option opts hint [String] (:nil) draw a rectangle around the text with the given color. Overrides global hints (see {Deck#hint}).
# Squib's constructor that sets the immutable properties.
#
# This is the starting point for Squib. In providing a block to the constructor, you have access to all of Deck's instance methods.
# The documented methods in Deck are the ones intended for use by most users.
# This is the starting point for Squib. In providing a block to the constructor, you have access to all of Deck's instance methods.
# The documented methods in Deck are the ones intended for use by most users.
# If your game requires multiple different sizes or orientations, I recommend using multiple `Squib::Deck`s in your `deck.rb`. You can modify the internals of `Squib::Deck` (e.g. `@cards`), but that's not recommended.
# @example
# @example
# require 'squib'
# Squib::Deck.new do
# text str: 'Hello, World!'
# end
#
# @param width: [Integer] the width of each card in pixels
# @param height: [Integer] the height of each card in pixels
# @param cards: [Integer] the number of cards in the deck
# @param dpi: [Integer] the pixels per inch when rendering out to PDF or calculating using inches.
# @param config: [String] the file used for global settings of this deck
#
# @param width [Integer] the width of each card in pixels
# @param height [Integer] the height of each card in pixels
# @param cards [Integer] the number of cards in the deck
# @param dpi [Integer] the pixels per inch when rendering out to PDF or calculating using inches.
# @param config [String] the file used for global settings of this deck
# @param block [Block] the main body of the script.
longtext="This is left-justified text.\nWhat do you know about tweetle beetles? well... \nWhen tweetle beetles fight, it's called a tweetle beetle battle. And when they battle in a puddle, it's a tweetle beetle puddle battle. AND when tweetle beetles battle with paddles in a puddle, they call it a tweetle beetle puddle paddle battle. AND... When beetles battle beetles in a puddle paddle battle and the beetle battle puddle is a puddle in a bottle... ..they call this a tweetle beetle bottle puddle paddle battle muddle. AND... When beetles fight these battles in a bottle with their paddles and the bottle's on a poodle and the poodle's eating noodles... ...they call this a muddle puddle tweetle poodle beetle noodle bottle paddle battle."