//<script type="text/javascript">

//=============================================================================
// The Doodle.Doc class stores information about the elements that the user is
// manipulating
Doodle.Doc = function() {
	this.objects = null;
	this.nextID = 0;
}

Doodle.Doc.prototype.init = function() {
	this.objects = new Array();
	this.nextID = 0;
}

Doodle.Doc.prototype.createLine = function(p1, p2, properties) {
	var line = new Doodle.Doc.Line();
	line.init(this.nextID++, p1, p2, properties);
	this.objects.push(line);
	return line;
}

//=============================================================================
// Doodle.Doc.Line

Doodle.Doc.Line = function() {
}

Doodle.Doc.Line.prototype.init = function(id, p1, p2, properties) {
	this.id = id;
	this.p1 = p1;
	this.p2 = p2;
}
Doodle.Doc.Line.prototype.setP1 = function(p) { this.p1 = p; }
Doodle.Doc.Line.prototype.getP1 = function() { return this.p1; }
Doodle.Doc.Line.prototype.setP2 = function(p) { this.p2 = p; }
Doodle.Doc.Line.prototype.getP2 = function() { return this.p2; }

//</script>