mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Add PointText documentation.
This commit is contained in:
parent
24689300c3
commit
50e996aa43
1 changed files with 28 additions and 0 deletions
|
@ -15,8 +15,30 @@
|
|||
*/
|
||||
|
||||
var PointText = this.PointText = TextItem.extend({
|
||||
/** @lends PointText# */
|
||||
|
||||
beans: true,
|
||||
|
||||
/**
|
||||
* Creates a point text item
|
||||
*
|
||||
* @example
|
||||
* var text = new PointText(new Point(50, 100));
|
||||
* text.paragraphStyle.justification = 'center';
|
||||
* text.content = 'The contents of the point text';
|
||||
* text.fillColor = 'black';
|
||||
*
|
||||
* @param {Point} point the position where the text will start
|
||||
*
|
||||
* @constructs PointText
|
||||
*
|
||||
* @class A PointText item represents a piece of typography in your Paper.js
|
||||
* project which starts from a certain point and extends by the amount of
|
||||
* characters contained in it.
|
||||
*
|
||||
* @extends TextItem
|
||||
* @extends Item
|
||||
*/
|
||||
initialize: function(point) {
|
||||
this.base();
|
||||
var point = Point.read(arguments);
|
||||
|
@ -33,6 +55,12 @@ var PointText = this.PointText = TextItem.extend({
|
|||
return copy;
|
||||
},
|
||||
|
||||
/**
|
||||
* The PointText's anchor point
|
||||
*
|
||||
* @type Point
|
||||
* @bean
|
||||
*/
|
||||
getPoint: function() {
|
||||
return this._point;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue