Package fmg.fmg8.graphVis.zeichenModi

Examples of fmg.fmg8.graphVis.zeichenModi.Polygon2D


     *
     * @param bezKonst  Die Bezierkonstante.
     */
    public void bezier(final double bezKonst) {
        double bezK = bezKonst;
        Polygon2D bez;
        Vektor2D v1, v2, v3, v4;
        ArrayList<Integer> mark = new ArrayList<Integer>(4);
       
        if (bezK > 1) {
            bezK = fmg.fmg8.graphVis.zeichenModi.Konstanten.BEZ_NORMAL;
        }
       
        if (this.mark1 != null
                && this.mark2 != null
                && !this.mark1.equals(this.mark2)
                && this.markierte.size() == 4) {
           
            mark.addAll(this.markierte);
               
            Collections.sort(this.markierte, new IntComp());

            v1 = this.pfeilPol.get(mark.get(0));
            v2 = this.pfeilPol.get(mark.get(1));
            v3 = this.pfeilPol.get(mark.get(2));
            v4 = this.pfeilPol.get(mark.get(3));

            bez = Geometrie2D.bezierKurve(v1, v2, v3, v4, bezK);
           
            Polygon2D polNeu = new Polygon2D();
            ArrayList<Double> dickenNeu = new ArrayList<Double>();
            boolean platziert = false;
           
            for (int i = 0; i < this.pfeilPol.size(); i++) {
                if (!this.between(mark.get(0), mark.get(3), i)) {
                    polNeu.add(this.pfeilPol.get(i));
                    dickenNeu.add(this.dicken.get(i));
                } else if (!platziert) {
                    for (int n = 0; n < bez.size(); n++) {
                        polNeu.add(bez.get(n));
                        dickenNeu.add(this.dicken.get(i));
                    }
                    platziert = true;
                }
            }
View Full Code Here


                        && feldPix[i][j] != Konstanten.FARBE_RAHMEN
                        && feldPix[i][j] != Konstanten.FARBE_INP_GEG
                        && feldPix[i][j] != Konstanten.FARBE_INP_TABU) {
                    dynFarbe = feldPix[i][j] - Byte.MIN_VALUE;
                    if (this.dynWaende[dynFarbe] == null) {
                        this.dynWaende[dynFarbe] = new Polygon2D();
                        this.dynVersch[dynFarbe] = new Vektor2D(0, 0);
                        this.dynOldVersch[dynFarbe] = new Vektor2D(0, 0);
                        this.dynGesetzt[dynFarbe] = false;
                        this.dynDrehMittPkt[dynFarbe]
                                  = new Vektor2D(Vektor2D.NULL_VEKTOR);
View Full Code Here

            List<Object> zeichenListe = master.graph(darstellung);
            buffImgAut = Geometrie2D.erzBuffImgAusObjekten(
                    zeichenListe,
                    this.pars);
           
            Polygon2D rahmen = Geometrie2D.rahmen(zeichenListe);
           
            BufferedImage zwisch = new BufferedImage(
                    this.pars.getFeld()[0].length,
                    this.pars.getFeld()[0].length,
                    BufferedImage.TYPE_INT_RGB);
           
            g = zwisch.createGraphics();
            g.setColor(Color.white);
            g.fillRect(0, 0, zwisch.getWidth(), zwisch.getHeight());
            g.drawImage(
                    buffImgAut,
                    0,
                    (int) ((zwisch.getHeight() - rahmen.getBoundingBox().getHoehe()) / 2),
                    null);
            g.setColor(Color.BLUE);
            g.drawString(
                    "Bester Roboter: "
                    + bester.getId()
View Full Code Here

        this.markierte = new LinkedList<Integer>();
        this.userSegs = new LinkedList<SegSpez>();
        this.setSize(750, 700);
       
        this.aktDicke = fmg.fmg8.graphVis.zeichenModi.Konstanten.PFEIL_DICKE;
        this.pfeilPol = new Polygon2D();
        this.pars = params;
        this.zeichenArt = new PfeilMaster(this.pars);
        this.segBeschr = new SegSpez[1000];
       
        this.addMouseWheelListener(this);
View Full Code Here

                Color.black, new Color(200, 200, 200), true, true);
        AusgMerkm ausgGELBPassiv = new AusgMerkm(
                Color.black, new Color(200, 200, 200), true, true);
        AusgMerkm ausgROTPassiv = new AusgMerkm(
                Color.black, new Color(200, 200, 200), true, true);
        Polygon2D quad = new Polygon2D(4);
        Vektor2D xSub = new Vektor2D(radius * 1.5, 0);
        Vektor2D ySub = new Vektor2D(0, radius * 1.5);
        Vektor2D zwisch;
        zwisch = new Vektor2D(linksOben);
        zwisch.sub(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);

        zwisch = new Vektor2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.sub(xSub);
        zwisch.add(ySub);
        quad.add(zwisch);

        zwisch = new Vektor2D(linksOben.x, linksOben.y + radius * 4 + radius);
        zwisch.add(xSub);
        zwisch.add(ySub);
        quad.add(zwisch);

        zwisch = new Vektor2D(linksOben.x, linksOben.y);
        zwisch.add(xSub);
        zwisch.sub(ySub);
        quad.add(zwisch);
       
        AusgMerkm zwAusg = new AusgMerkm(Color.black, Color.black, true, true);
        liste.add(zwAusg);
        liste.add(quad.toPol(1, Vektor2D.NULL_VEKTOR));
       
        Kreis2D k1 = new Kreis2D(
                linksOben.x,
                linksOben.y,
                radius);
View Full Code Here

       
        Vektor2D anfWin = new Vektor2D(this.pfeilPol.get(1));
        anfWin.sub(this.pfeilPol.get(0));
        double winkel = Math.atan(anfWin.x / anfWin.y);
       
        Polygon2D p = (new PfeilMaster(this.pars)).segmentPfeilPol2D(
                this.pfeilPol,
                this.dicken,
                PfeilMaster.EINFACHER_ABSCHLUSS,
                this.anfang,
                new Vektor2D(this.anfFakt, this.anfFakt),
                new Vektor2D(1, 1));
       
        p.verschiebe(versch);
       
        p.skaliere(
                Vektor2D.NULL_VEKTOR,
                new Vektor2D(1 / this.dicken.get(0), 1 / this.dicken.get(0)));
       
        p.drehe(Vektor2D.NULL_VEKTOR, winkel);
       
        return p;
    }
View Full Code Here

                        unmark2,
                        4);
            }
           
            if (this.ersteEcke != null && this.zweiteEcke != null) {
                Polygon2D quad = new Polygon2D(4);
               
                quad.add(new Vektor2D(this.ersteEcke));
                quad.add(new Vektor2D(this.ersteEcke.x, this.zweiteEcke.y));
                quad.add(new Vektor2D(this.zweiteEcke));
                quad.add(new Vektor2D(this.zweiteEcke.x, this.ersteEcke.y));
               
                liste.add(new AusgMerkm(
                        Color.lightGray,
                        Color.black,
                        true,
                        false));
                liste.add(quad.toPol(this.skalierung, this.verschiebung));
            }
           
            LinkedList<AbstractMsg> msgsError
                = this.pars.getMsgs(
                    (new MsgError(null, 0, null)).getType(),
View Full Code Here

     * Verzeichnis.
     */
    private void ladeGraphen() {
        File verz = new File(this.pars.getStdPfad());
        String endung = fmg.fmg8.graphVis.Konstanten.GRAPH_ENDUNG;
        String[] gespGr = verz.list(new DateiFilter(endung));
        String grNam;
        VisMantel visRob = null;
        Vis obs = null;
        boolean sel = false;
       
View Full Code Here

        this.removeAll();
       
        this.addWindowListener(new WindHideAdapt());
       
        this.zwischenablage = new Zwischenablage();

        this.zeichenArt = new PfeilMaster(this.pars);
        this.gewKnot = null;

        this.setLayout(new BorderLayout());
View Full Code Here

                    Konstanten.OBEN,
                    this.getWidth() - 50,
                    this.getHeight() - 50);
        }

        this.zwischenablage = new Zwischenablage();

        this.zeichenArt = new PfeilMaster(this.pars);
        this.selKnot = new Knoten[autAnz];
        this.gewKnot = null;
View Full Code Here

TOP

Related Classes of fmg.fmg8.graphVis.zeichenModi.Polygon2D

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.