Package org.joshy.gfx.draw

Examples of org.joshy.gfx.draw.Paint


        g.fillOval(this.getX(), this.getY(), this.getWidth(), this.getHeight());
    }

    public void draw(GFX g) {
        drawShadow(g);
        Paint paint = this.getFillPaint();
        if(paint != null) {
            double opacity = -1;
            if(paint instanceof FlatColor) {
                g.setPaint(((FlatColor)paint).deriveWithAlpha(getFillOpacity()));
            }
View Full Code Here


        private boolean useDocBg = true;

        public void docStart(Graphics2D g2, SketchDocument doc) {
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            SwingGFX gfx = new SwingGFX(g2);
            Paint fill = doc.getBackgroundFill();
            if(fill != null && useDocBg) {
                gfx.setPaint(fill);
                gfx.fillRect(0,0,(int)doc.getWidth(), (int) doc.getHeight());
            }
        }
View Full Code Here

TOP

Related Classes of org.joshy.gfx.draw.Paint

Copyright © 2018 www.massapicom. 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.