Package org.nlogo.shape

Examples of org.nlogo.shape.VectorShape.paint()


  private ImageIcon getShapeIcon(double colorValue) {
    VectorShape defaultShape = org.nlogo.shape.VectorShape.getDefaultShape();
    BufferedImage image = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
    org.nlogo.api.Graphics2DWrapper g2 = new org.nlogo.api.Graphics2DWrapper(image.createGraphics());
    g2.antiAliasing(true);
    defaultShape.paint
        (g2,
            new Color(org.nlogo.api.Color.getARGBbyPremodulatedColorNumber(colorValue)),
            0, 0, 16, 0);
    g2.drawImage(image);
    return new ImageIcon(image);
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.