
//
// moveTo.js
//

function _moveTo(x,y)
{
	this.x = x;
	this.y = y;

	this.functionMeta = _moveTo.functionMeta;
}

_moveTo.prototype = new pathSeg();

_moveTo.functionMeta =
	{
		functionName:'moveTo',
		functionArgs:
		[
			{
				name:'x',
				text:'x coordinate',
				type:'float'
			},
			{
				name:'y',
				text:'y coordinate',
				type:'float'
			}
		],
		controlPoints:
		{
			cp1:
			{
				name:'cursor',
				description:'new cursor x position',
			}
		}
	}

_moveTo.prototype.setControlPoint = function(cp, x, y)
{
	if (cp.name == 'cursor')
	{
		this.x = x;
		this.y = y;
	}
}

_moveTo.prototype.toControlPoints = function()
{
	var out =
	{
		cursor:{
			name:'cursor',
			x:this.x,
			y:this.y,
			model:this
		}
	};

	return out;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Book descriptions
//
///////////////////////////////////////////////////////////////////////////////////////////////////

_moveTo.human =
	{
		title:'moveTo',
		text:'This function repositions the current drawing position. This is like picking the pen up off the paper when drawing then putting it down somewhere else. The pen has moved but left no mark on the paper.',
		browserhref:'somewherethereisapileofphpjsetcthatrunsbrowsertests'
	};




