@Override
protected void mouseDragged(MouseEvent event, Point2D cursor) {
PixelLayer layer = getContext().getDocument().getCurrentLayer();
PixelGraphics g = layer.getGraphics();
g.setFill(getContext().getDocument().getForegroundColor());
g.fillOval((int)cursor.getX()-radius/2,(int)cursor.getY()-radius/2,radius,radius,smooth.isSelected());
getContext().getCanvas().redraw();
}
@Override
protected void mouseReleased(MouseEvent event, Point2D cursor) {