public void drawAsLine(Graphics graphics, double xmin, double xmax, double ymin, double ymax, Dimension componentSize) {
		Graphics2D g = (Graphics2D) graphics;
		
		double b1 = a*xmin + b;
		double b2 = a*xmax + b;
		
		double y1 = VisualPoint.bToY(b1, ymin, ymax, componentSize);
		double y2 = VisualPoint.bToY(b2, ymin, ymax, componentSize);
		
		
		/*double yscale = componentSize.getHeight() / (ymax - ymin);
		
		double y1 = a*xmin + b;
    	double y2 = a*xmax + b;

    	double dy1 = ((-y1)+ ymax)*yscale;
    	double dy2 = ((-y2)+ ymax)*yscale;*/
		
		if (this.type == PointType.BLUE) {
			if (this.highlighted) {
				if (this.deleted) {
					g.setColor(new Color(200, 255, 255));
				} else {
					g.setColor(Color.cyan);
				}
			} else {
				if (this.deleted) {
					g.setColor(new Color(200, 200, 255));
				} else {
					g.setColor(Color.blue);
				}
			}
		} else if (this.type == PointType.RED) {
			if (this.highlighted) {
				if (this.deleted) {
					g.setColor(new Color(255, 255, 200));
				} else {
					g.setColor(Color.orange);
				}
			} else {
				if (this.deleted) {
					g.setColor(new Color(255, 200, 200));
				} else {
					g.setColor(Color.red);
				}
			}
		} else {
			throw new IllegalStateException("Invalid point type.");
		}
		
		if (this.deleted) {
			g.setStroke(new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, new float[]{3}, 0));
			
			g.drawLine(0,(int) componentSize.getHeight() - (int) y1,(int) componentSize.getWidth(), (int) componentSize.getHeight() - (int) y2);
			g.setStroke(new BasicStroke(1));
		} else {
			g.drawLine(0,(int) componentSize.getHeight() - (int) y1,(int) componentSize.getWidth(), (int) componentSize.getHeight() - (int) y2);
		}
	}