Package org.joshy.sketch.pixel.model

Examples of org.joshy.sketch.pixel.model.PixelGraphics.fillOval()


    @Override
    protected void mousePressed(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 mouseDragged(MouseEvent event,  Point2D cursor) {
View Full Code Here


    @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) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.