
//
// lineTo.js
//

function _lineTo(x,y)
{
	this.x = x;
	this.y = y;

	this.functionMeta = _lineTo.functionMeta;
}

_lineTo.prototype = new pathSeg();

_lineTo.functionMeta =
	{
		functionName:'lineTo',
		functionArgs:
		[
			{
				name:'x',
				text:'x coordinate',
				type:'float'
			},
			{
				name:'y',
				text:'y coordinate',
				type:'float'
			}
		],
		controlPoints:
		{
			cp1:
			{
				name:'cursor',
				description:'new cursor x position',
			},
		}
	}

_lineTo.prototype.setControlPoint = function(cp, x, y)
{
	if (cp.name == 'cursor')
	{
		this.x = x;
		this.y = y;
	}
}

_lineTo.prototype.toControlPoints = function()
{
	var out = 
	{
		cursor:{
			name:'cursor',
			x:this.x,
			y:this.y,
			model:this
		}
	};
	
	return out;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Book descriptions
//
///////////////////////////////////////////////////////////////////////////////////////////////////

_lineTo.human =
	{
		title:'lineTo',
		text:'Marks a marke between the current cursor position on the new (specified) cursor position',
		browserhref:'somewherethereisapileofphpjsetcthatrunsbrowsertests'
	};




