Package java.awt

Examples of java.awt.Graphics2D.drawPolygon()


                new Vector2D(screenWidth - screenLeft, screenHeight - screenUp));
        Polygon2D bound = visibleBox.toPol2D();
        bound.scale(Vector2D.NULL_VECTOR, new Vector2D(globalScale, globalScale));
        bound.translate(midTranslation);
        g.setColor(Color.red);
        g.drawPolygon(border.toPol());
       
        if (this.pars.getParValueBoolean("PaintPinkBoundingBox?")) {
            g.setColor(Color.pink);
            g.drawPolygon(bound.toPol());
            g.drawString(
View Full Code Here


        g.setColor(Color.red);
        g.drawPolygon(border.toPol());
       
        if (this.pars.getParValueBoolean("PaintPinkBoundingBox?")) {
            g.setColor(Color.pink);
            g.drawPolygon(bound.toPol());
            g.drawString(
                    visibleBox.upperLeftCorner().toString(),
                    (int) bound.getBoundingBox().upperLeftCorner().x,
                    (int) bound.getBoundingBox().upperLeftCorner().y - 10);
            String rechtsunten = visibleBox.lowerRightCorner().toString();
View Full Code Here

                        (int) shape.getBoundingBox().getHeight(),
                        null);
            }
           
            g.setColor(Color.DARK_GRAY);
            g.drawPolygon(p);
            if (this.showIDs) {
                Vector2D pos = shape.centerPoint();
                g.drawString("" + id, (int) pos.x, (int) pos.y);
            }
        }
View Full Code Here

                arrow = this.getPolygonInVisualization(arrow);
               
                g.setColor(color);
                g.fillPolygon(arrow.toPol());
                g.setColor(Color.black);
                g.drawPolygon(arrow.toPol());
                g.drawString(StaticMethods.round(currentNeuron.getInput(), 2)
                        + "", (float) startPoint.x, (float) startPoint.y - 5);

                Vector2D textPos = new Vector2D(startPoint.x, startPoint.y - 0.2);
                textPos = this.getPointInVisualization(textPos);
View Full Code Here

                arrow = this.getPolygonInVisualization(arrow);

                g.setColor(color);
                g.fillPolygon(arrow.toPol());
                g.setColor(Color.black);
                g.drawPolygon(arrow.toPol());
                g.drawString(StaticMethods.round(currentNeuron.getOutput(), 2)
                        + "", (float) startPoint.x, (float) startPoint.y - 8);

                color = Color.orange;
               
View Full Code Here

                    g.setColor(Color.red);
                }
               
                if (weightPosSelf == null) {
                    g.fillPolygon(pol.toPol());
                    g.drawPolygon(pol.toPol());
                }
               
                // Weight text.
                Font font;
                if (Math.abs(weightFactor) > 0.5) {
View Full Code Here

                    g.setColor(objectColor);
                    g.fillPolygon(shape.toPol());
                }
               
                g.setColor(Color.black);
                g.drawPolygon(shape.toPol());
                g.setColor(oldColor);
            }
        }

        Polygon2D p = new Polygon2D();
View Full Code Here

        if (this.torus) {
            g.setColor(Color.lightGray);
        } else {
            g.setColor(Color.black);
        }
        g.drawPolygon(this.getPolygonInVisualization(p).toPol());
       
        oldFieldView = envView;
       
        return envView;
    }
View Full Code Here

                for (int j = 0; j < this.tileNumVertically; j++) {
                    Rectangle2D r = this.getTileRectangle(new Vector2D(i, j));
                    Polygon2D polInVis = super.getPolygonInVisualization(r.toPol2D());
                    Vector2D pos = polInVis.centerPoint();
                    g.setColor(Color.orange);
                    g.drawPolygon(polInVis.toPol());
//                    g.drawString(i + " / " + j, (float) pos.x, (float) pos.y);
                    g.drawString("" + this.getAgentsTouchingTile(new Vector2D(i, j)).size(), (float) pos.x, (float) pos.y);
                }
            }
        }
View Full Code Here

        if (showRays) {
            g.drawString("(Rays may be delayed by one simulation cycle.)", 200, 25);
           
            g.setStroke(new BasicStroke(2));
            for (Polygon2D pol : this.rays) {
                g.drawPolygon(this.getPolygonInVisualization(pol).toPol());
            }
        }
       
        rays.clear();
       
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.