mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-13 06:29:11 -04:00
Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples.
This commit is contained in:
parent
219f288207
commit
7cd749e63d
50 changed files with 697 additions and 781 deletions
src/basic
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Paper.js
|
||||
*
|
||||
*
|
||||
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
|
||||
* based on Scriptographer.org and designed to be largely API compatible.
|
||||
* http://paperjs.org/
|
||||
* http://scriptographer.org/
|
||||
*
|
||||
*
|
||||
* Distributed under the MIT license. See LICENSE file for details.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
|
||||
* http://lehni.org/ & http://jonathanpuckey.com/
|
||||
*
|
||||
*
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
|
@ -19,38 +19,38 @@
|
|||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
var Matrix = this.Matrix = Base.extend({
|
||||
/** @lends Matrix# */
|
||||
|
||||
/**
|
||||
* @name Matrix
|
||||
*
|
||||
* @class An affine transform performs a linear mapping from 2D coordinates
|
||||
* to other 2D coordinates that preserves the "straightness" and
|
||||
* "parallelness" of lines.
|
||||
*
|
||||
* Such a coordinate transformation can be represented by a 3 row by 3
|
||||
* column matrix with an implied last row of [ 0 0 1 ]. This matrix
|
||||
* transforms source coordinates (x,y) into destination coordinates (x',y')
|
||||
* by considering them to be a column vector and multiplying the coordinate
|
||||
* vector by the matrix according to the following process:
|
||||
* <pre>
|
||||
* [ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
|
||||
* [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
|
||||
* [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
|
||||
* </pre>
|
||||
*
|
||||
* This class is optimized for speed and minimizes calculations based on its
|
||||
* knowledge of the underlying matrix (as opposed to say simply performing
|
||||
* matrix multiplication).
|
||||
*/
|
||||
var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
|
||||
/**
|
||||
* Creates a 2D affine transform.
|
||||
*
|
||||
* @constructs Matrix
|
||||
* @param {Number} m00 The m00 coordinate of the transform.
|
||||
* @param {Number} m10 The m10 coordinate of the transform.
|
||||
* @param {Number} m01 The m01 coordinate of the transform.
|
||||
* @param {Number} m11 The m11 coordinate of the transform.
|
||||
* @param {Number} m02 The m02 coordinate of the transform.
|
||||
* @param {Number} m12 The m12 coordinate of the transform.
|
||||
*
|
||||
* @class An affine transform performs a linear mapping from 2D coordinates
|
||||
* to other 2D coordinates that preserves the "straightness" and
|
||||
* "parallelness" of lines.
|
||||
*
|
||||
* Such a coordinate transformation can be represented by a 3 row by 3
|
||||
* column matrix with an implied last row of [ 0 0 1 ]. This matrix
|
||||
* transforms source coordinates (x,y) into destination coordinates (x',y')
|
||||
* by considering them to be a column vector and multiplying the coordinate
|
||||
* vector by the matrix according to the following process:
|
||||
* <pre>
|
||||
* [ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
|
||||
* [ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
|
||||
* [ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
|
||||
* </pre>
|
||||
*
|
||||
* This class is optimized for speed and minimizes calculations based on its
|
||||
* knowledge of the underlying matrix (as opposed to say simply performing
|
||||
* matrix multiplication).
|
||||
*/
|
||||
initialize: function(m00, m10, m01, m11, m02, m12) {
|
||||
var ok = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue