Package java.awt

Examples of java.awt.Graphics2D.drawPolygon()


        LineSegment2D l = new LineSegment2D(new Vector2D(0 - epsilon, heightGO + epsilon), new Vector2D(this.getWidth() - epsilon, heightGO + epsilon));
        g.setColor(Color.red);
        g.drawPolygon(this.getPolygonInVisualization(l.toPol2D()).toPol());
        g.setStroke(new BasicStroke(5));
        g.setColor(Color.orange);
        g.drawPolygon(this.getPolygonInVisualization(r.toPol2D()).toPol());
       
        g.setColor(Color.black);
        g.setStroke(new BasicStroke(8));
       
        float maxX = Float.NEGATIVE_INFINITY;
View Full Code Here


        }
       
        LineSegment2D l2 = new LineSegment2D(
                new Vector2D(minX - epsilon, this.getGridHeight() - epsilon),
                new Vector2D(maxX + epsilon, this.getGridHeight() - epsilon));
        g.drawPolygon(this.getPolygonInVisualization(l2.toPol2D()).toPol());
       
        // Show text.
        if (this.showText != null) {
            this.showCyclesText = 20 + this.showText.length() * 2;
            this.showNewText = this.showText;
View Full Code Here

           
            Polygon2D line2 = new Polygon2D();
            line2.add(new Vector2D(-epsilon, bombpos.y - this.bombs + epsilon));
            line2.add(new Vector2D(this.getGridWidth() - epsilon, bombpos.y - this.bombs + epsilon));
           
            g.drawPolygon(this.getPolygonInVisualization(line1).toPol());
            g.drawPolygon(this.getPolygonInVisualization(line2).toPol());
        }
       
        return img;
    }
View Full Code Here

            Polygon2D line2 = new Polygon2D();
            line2.add(new Vector2D(-epsilon, bombpos.y - this.bombs + epsilon));
            line2.add(new Vector2D(this.getGridWidth() - epsilon, bombpos.y - this.bombs + epsilon));
           
            g.drawPolygon(this.getPolygonInVisualization(line1).toPol());
            g.drawPolygon(this.getPolygonInVisualization(line2).toPol());
        }
       
        return img;
    }
View Full Code Here

                   
                    g2.fillPolygon((Polygon) obj);
                }
                if (rahmenDrucken) {
                    g2.setColor(rahmenFarbe);
                    g2.drawPolygon((Polygon) obj);
                }
            } else if (obj.getClass().equals(Circle2D.class)) {
                kreis = (Circle2D) obj;
                if (fuellungDrucken) {
                    if (gp == null) {
View Full Code Here

                   
                    g2.fillPolygon((Polygon) obj);
                }
                if (rahmenDrucken) {
                    g2.setColor(rahmenFarbe);
                    g2.drawPolygon((Polygon) obj);
                }
            } else if (obj.getClass().equals(Kreis2D.class)) {
                kreis = (Kreis2D) obj;
                if (fuellungDrucken) {
                    if (gp == null) {
View Full Code Here

                        ArrowMaster.EINFACHE_SPITZE_1, new Vector2D(1, 1),
                        new Vector2D(1, 1));
                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);
            }

            if (currentNeuron.isOutput()) {
View Full Code Here

                        ArrowMaster.EINFACHE_SPITZE_1, new Vector2D(1, 1),
                        new Vector2D(1, 1));
                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

                            new Vector2D(this.getAgentPosition(a.id()).x
                                    + width / 2,
                                    this.getAgentPosition(a.id()).y + width / 2));
                    pol = rect.toPol2D();
                    pol = this.getPolygonInVisualization(pol);
                    g.drawPolygon(pol.toPol());
                }
            }
        }

        return img;
View Full Code Here

        this.drawPixel2D.clear();

        int i = 23;
        for (Polygon2D p : this.zuZeichnen) {
            g.setColor(new Color(120, 180, i));
            g.drawPolygon(p.toPol());
            i = (i + 101) % 256;
        }
        this.zuZeichnen.clear();
       
//        return super.generateEnvironmentView();
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.