@Override
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		Graphics2D g2 = (Graphics2D) g;
		g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
		ImageData imgData = sheetData.getCurrentImageData();
		
		if (imgData.hasImage()){
			g.clearRect(0, 0, getScaledWidth(), getScaledHeight());
			g2.drawImage(imgData.getImage(), 0, 0, getScaledWidth(), getScaledHeight(), null);
			
			if (imgData.hasAnchor()){
				g.setXORMode(Color.WHITE);
				g.fillRect(getScaledCoord(imgData.getAnchor().x), getScaledCoord(imgData.getAnchor().y), 
						(int) imgData.getScale(), (int) imgData.getScale());
				g2.setStroke(new BasicStroke(2));
				g.setPaintMode();
				g.setColor(Color.PINK);
				g.drawRect(getScaledCoord(imgData.getAnchor().x), getScaledCoord(imgData.getAnchor().y), 
						(int) imgData.getScale(), (int) imgData.getScale());
			}
			
			if (imgData.getType().equals(ImageType.SHEET)){
				Rectangle r;
				g.setColor(Color.DARK_GRAY);
				for (ImageData iData: sheetData.getAllImageData()){
					if (!iData.equals(imgData)){
						r = iData.getRect();
						g.drawRect(getScaledCoord(r.x), getScaledCoord(r.y), 
								getScaledCoord(r.width), getScaledCoord(r.height));
					}
				}
			}
			
			if (imgData.getType().equals(ImageType.IMAGE)){
				int[] yCoords;
				int[] xCoords;
				
				g.setColor(Color.ORANGE);
				if (imgData.getPoly() != null){
					xCoords = imgData.getPoly().xpoints;
					yCoords = imgData.getPoly().ypoints;
					for (int i = 0; i < imgData.getPoly().npoints; i++){
						g.drawLine(getScaledCoord(xCoords[i] + 0.5), getScaledCoord(yCoords[i] + 0.5), 
								getScaledCoord(xCoords[(i + 1) % imgData.getPoly().npoints] + 0.5), 
								getScaledCoord(yCoords[(i + 1) % imgData.getPoly().npoints] + 0.5));
					}
				}
				
				for (Hook h : imgData.getHooks()){
					g.setColor(Color.CYAN);
					g.fillOval(getScaledCoord(h.getPt().x), getScaledCoord(h.getPt().y), 
							getScaledCoord(1), getScaledCoord(1));
					g.setColor(Color.WHITE);
					g.drawOval(getScaledCoord(h.getPt().x), getScaledCoord(h.getPt().y), 
							getScaledCoord(1), getScaledCoord(1));
				}
			}
			
			MainWindow.MAIN_WINDOW.currentTool.drawTool(g, mouseX, mouseY);
		}
	}