lineTo(x, y) {
		const points = this.points;
		const startPoint = this.startPoint;
		const lastPoint =
			points.length === 0 ? startPoint : points[points.length - 1];

		if (!startPoint.equals(lastPoint)) {
			points.push(pointPool.get(startPoint.x, startPoint.y));
		} else {
			points.push(pointPool.get(lastPoint.x, lastPoint.y));
		}
		points.push(pointPool.get(x, y));

		startPoint.x = x;
		startPoint.y = y;

		this.isDirty = true;
	}
connects the last point in the current path to the (x, y) coordinates with a straight line.
@param {number} x - the x-axis coordinate of the line's end point.
@param {number} y - the y-axis coordinate of the line's end point.