       )
 
     ###*
-     * Translates the matrix along the x and y axes, as specified by the tx and ty parameters.
-     * @name translate
-     * @methodOf Matrix#
-     * @see Matrix.translation
-     *
-     * @param {Number} tx The translation along the x axis.
-     * @param {Number} ty The translation along the y axis.
-     * @returns A new matrix with the translation applied.
-     * @type Matrix
+    Translates the matrix along the x and y axes, as specified by the tx and ty parameters.
+    @name translate
+    @methodOf Matrix#
+    @see Matrix.translation
+
+    @param {Number} tx The translation along the x axis.
+    @param {Number} ty The translation along the y axis.
+    @returns A new matrix with the translation applied.
+    @type Matrix
     ###
     translate: (tx, ty) ->
       this.concat(Matrix.translation(tx, ty))
 
 
   ###*
-   * Creates a matrix transformation that corresponds to the given rotation,
-   * around (0,0) or the specified point.
-   * @see Matrix#rotate
-   *
-   * @param {Number} theta Rotation in radians.
-   * @param {Point} [aboutPoint] The point about which this rotation occurs. Defaults to (0,0).
-   * @returns 
-   * @type Matrix
-  ###
-  Matrix.rotation = (theta, aboutPoint) ->
+  Creates a matrix transformation that corresponds to the given rotation,
+  around (0,0) or the specified point.
+  @see Matrix#rotate
+
+  @param {Number} theta Rotation in radians.
+  @param {Point} [aboutPoint] The point about which this rotation occurs. Defaults to (0,0).
+  @returns 
+  @type Matrix
+  ###
+  Matrix.rotate = Matrix.rotation = (theta, aboutPoint) ->
     rotationMatrix = Matrix(
       Math.cos(theta),
       Math.sin(theta),

###
( ->
  ###*
   * <pre>
   *  _        _
   * | a  c tx  |
   * | b  d ty  |
   * |_0  0  1 _|
   * </pre>
   * Creates a matrix for 2d affine transformations.
   *
   * concat, inverse, rotate, scale and translate return new matrices with the
   * transformations applied. The matrix is not modified in place.
   *
   * Returns the identity matrix when called with no arguments.
   * @name Matrix
   * @param {Number} [a]
   * @param {Number} [b]
   * @param {Number} [c]
   * @param {Number} [d]
   * @param {Number} [tx]
   * @param {Number} [ty]
   * @constructor
  ###
  Matrix = (a, b, c, d, tx, ty) ->
    a = if a? then a else 1
    d = if d? then d else 1

    ###*
     * @name a
     * @fieldOf Matrix#
    ###
    a: a
    ###*
     * @name b
     * @fieldOf Matrix#
    ###
    b: b || 0
    ###*
     * @name c
     * @fieldOf Matrix#
    ###
    c: c || 0,
    ###*
     * @name d
     * @fieldOf Matrix#
    ###
    d: d
    ###*
     * @name tx
     * @fieldOf Matrix#
    ###
    tx: tx || 0
    ###*
     * @name ty
     * @fieldOf Matrix#
    ###
    ty: ty || 0

    ###*
     * Returns the result of this matrix multiplied by another matrix
     * combining the geometric effects of the two. In mathematical terms, 
     * concatenating two matrixes is the same as combining them using matrix multiplication.
     * If this matrix is A and the matrix passed in is B, the resulting matrix is A x B
     * http://mathworld.wolfram.com/MatrixMultiplication.html
     * @name concat
     * @methodOf Matrix#
     *
     * @param {Matrix} matrix The matrix to multiply this matrix by.
     * @returns The result of the matrix multiplication, a new matrix.
     * @type Matrix
    ###
    concat: (matrix) ->
      Matrix(

    return scaleMatrix

  ###*
  Returns a matrix that corresponds to a translation of tx, ty.
  @see Matrix#translate

  @param {Number} tx The amount to translate in the x direction.
  @param {Number} ty The amount to translate in the y direction.
  @return A matrix transformation representing a translation by tx and ty.
  @type Matrix
  ###
  Matrix.translate = Matrix.translation = (tx, ty) ->
    Matrix(1, 0, 0, 1, tx, ty)

  ###*
  A constant representing the identity matrix.
  @name IDENTITY
  @fieldOf Matrix
  ###
  Matrix.IDENTITY = Matrix()

  ###*
  A constant representing the horizontal flip transformation matrix.
  @name HORIZONTAL_FLIP
  @fieldOf Matrix
  ###
  Matrix.HORIZONTAL_FLIP = Matrix(-1, 0, 0, 1)

  ###*
  A constant representing the vertical flip transformation matrix.
  @name VERTICAL_FLIP
  @fieldOf Matrix
  ###
  Matrix.VERTICAL_FLIP = Matrix(1, 0, 0, -1)

