API Docs for: 0.0.2
Show:

canvas.Filter Class

Class for SVG filter effects, example Drop Shadow Note! Filters will produce raster graphic, not Vector. Note! Filters are not supported by IE 9 and lower. (Support is added to IE10). Ref: http://caniuse.com/svg-filters

Constructor

canvas.Filter

(
  • attributes
  • config
)

Parameters:

Methods

addFeMergeNode

(
  • key
)
canvas.Node

Adds a new feMergeNode DOM node to the feMerge node

Parameters:

Returns:

canvas.Node: feMergeNode

buildTransformationCache

(
  • el
  • id
)
private

Parameters:

get

(
  • el
  • key
)

Returns property value of a SVG DOM node

Parameters:

hasTransformationCache

(
  • id
)
Boolean private

Parameters:

Returns:

remove

(
  • el
  • key
)

Remove property from node.

Parameters:

rotate

(
  • el
  • rotation
)

Apply rotation to element

Parameters:

rotateAround

(
  • el
  • rotation
  • x
  • y
)

Rotate around a speific point

Parameters:

set

(
  • el
  • key
  • value
)

Updates a property of a SVG DOM node

Parameters:

setDropShadow

(
  • properties
)

Set drop shadow

Parameters:

Example:

filter.setDropShadow({
    x: 2, y: 2, // Offset
    deviation: 2, // blur
    color : '#000'
});

toRad

(
  • degrees
)
Number

Degrees to radians method

Parameters:

Returns:

Properties

classNameCache

Object private

Cache of class names

tCache

Object private

Transformation cache

tCacheStrings

Object private

Internal cache

tCacheStrings

Object private

Internal cache