@Override
	public void draw() {

		// draw to the image and then when call repaint redraws image on the
		// JComponent

		if (canvas.getCounter() != 0) {
			Graphics2D g = (Graphics2D) canvas.getLayers()[canvas.getLayerSelected()].getGraphics();
			canvas.setGraphicsDetails(g);
			g.drawLine(previousX + 1, previousY + 1, x, y);
		}

		canvas.incrementCounter();
		canvas.repaint();

	}