Module: Compass::Canvas::Functions

Includes:
Canvas, Context, Path, Pattern, Plugins::Functions
Included in:
Sass::Script::Functions
Defined in:
lib/canvas/functions.rb,
lib/canvas/functions/pattern.rb,
lib/canvas/functions/context.rb,
lib/canvas/functions/canvas.rb,
lib/canvas/functions/path.rb

Overview

The Functions module aggregates all exported functions.

Defined Under Namespace

Modules: Canvas, Context, Path, Pattern

Class Method Summary collapse

Methods included from Pattern

#brush, #canvas_pattern, #dash_pattern, #mask

Methods included from Path

#canvas_path

Methods included from Context

#canvas_context, #slow_blur

Methods included from Canvas

#canvas, #height_of, #path_x, #path_y, #width_of

Class Method Details

.unpack(value) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/canvas/functions.rb', line 20

def self.unpack(value)
  if value.is_a?(Compass::Canvas::Backend::Interface::Base)
    value
  elsif value.is_a?(Sass::Script::Literal)
    Compass::Canvas::Functions.unpack(value.value)
  elsif value.is_a?(Array)
    value.map { |child| Compass::Canvas::Functions.unpack(child) }
  else
    value
  end
end