Class: SvgPiece

SvgPiece

A single piece description. This includes: square size (assumes piece is 0,0,size,size) and array of paths and attributes to draw the path

Constructor

new SvgPiece()

Author:
  • mark.veltzer@gmail.com (Mark Veltzer)
Source:

Methods

add(paa)

Adds a new path section to a piece description
This:
Parameters:
Name Type Description
paa PathAndAttributes object to be added.
Author:
  • mark.veltzer@gmail.com (Mark Veltzer)
Source:

initialize(size) → {SvgPiece}

creates a new instance
This:
Parameters:
Name Type Description
size number of the square of the piece.
Author:
  • mark.veltzer@gmail.com (Mark Veltzer)
Source:
Returns:
a new object of this type.
Type
SvgPiece

toSet(paper, transform) → {set}

Create a Raphael.js set from this object
This:
Parameters:
Name Type Description
paper paper Raphael.js paper to work on.
transform transform Raphael.js transformating for this object.
Author:
  • mark.veltzer@gmail.com (Mark Veltzer)
Source:
Returns:
the set after the transformation.
Type
set