Add PointText documentation.

This commit is contained in:
Jonathan Puckey 2011-05-23 19:13:51 +02:00
parent 24689300c3
commit 50e996aa43

View file

@ -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;
},