Package eas.math.geometry

Examples of eas.math.geometry.Pixel2D_08Bit


        if (setzen) {
            if (this.feld[x][y] != farbe || unbed) {
                this.feld[x][y] = farbe;
               
                if (this.existsVideoPlug) {
                    this.drawPixel2D.add(new Pixel2D_08Bit(x, y, farbe));
                }
                   
                // TODO: Nächste IF-Bedingung überflüssig, wenn keine Observer.
                if (this.isVisualized() && !temp) {
                    this.neuerPixel2D = new Pixel2D_08Bit(x, y, farbe);
                    this.setChanged();
                    this.notifyObservers();
                }
            }
        }
View Full Code Here


       
        if (this.existsVideoPlug) {
            this.drawPixel2D.clear();
            for (int i = 0; i < feld.length; i++) {
                for (int j = 0; j < feld[0].length; j++) {
                    this.drawPixel2D.add(new Pixel2D_08Bit(i, j, feld[i][j]));
                }
            }
        }
    }
View Full Code Here

       
        if (this.existsVideoPlug) {
            this.drawPixel2D.clear();
            for (int i = 0; i < feld.length; i++) {
                for (int j = 0; j < feld[0].length; j++) {
                    this.drawPixel2D.add(new Pixel2D_08Bit(i, j, feld[i][j]));
                }
            }
        }
    }
View Full Code Here

        double yFakt = bF / bf;
        int xNeuErst;
        int yNeuErst;
        int xNeuLetzt;
        int yNeuLetzt;
        Pixel2D_08Bit normPix = null;
        Iterator<Pixel2D_08Bit> it = this.neueNormPixel2D.iterator();

        while (it.hasNext()) {
            try {
                normPix = it.next();
                xNeuErst = (int) Math.round(normPix.x * xFakt);
                yNeuErst = (int) Math.round(normPix.y * yFakt);
                xNeuLetzt = (int) Math.round((normPix.x + 1) * xFakt);
                yNeuLetzt = (int) Math.round((normPix.y + 1) * yFakt);
                for (int x = xNeuErst; x < xNeuLetzt; x++) {
                    for (int y = yNeuErst; y < yNeuLetzt; y++) {
                        if (this.darFeld[x][y] != normPix.color()) {
                            this.wartPixel2D.add(new Pixel2D_08Bit(x,
                                                         y,
                                                         normPix.color()));
                            this.darFeld[x][y] = normPix.color();
                        }
                    }
                }
            } catch (final Exception e) {
                StaticMethods.log(StaticMethods.LOG_WARNING,
View Full Code Here

     * @param g  Das Grafik-Feld.
     */
    private void maleFeld(final Graphics g) {
        Graphics g2 = img.getGraphics();
        LinkedList<Pixel2D_08Bit> pixel2D;
        Pixel2D_08Bit aktPix;
        Iterator<Pixel2D_08Bit> it;
       
        if (this.xRand == 0 && this.yRand == 0) {
            this.xRand = g.getClipBounds().getX()
                         + ConstantsSimulation.SIM_RAND_LINKS;
            this.yRand = g.getClipBounds().getY()
                         + ConstantsSimulation.SIM_RAND_OBEN;
        }

        this.berZuZeichnendePixel();
       
        pixel2D = this.wartPixel2D;

        it = pixel2D.iterator();
        while (it.hasNext()) {
            aktPix = it.next();

            if (aktPix.color() == ConstantsSimulation.FARBE_ROB) {
                g2.setColor(ConstantsSimulation.C_VORDERGRUND);
            } else if (aktPix.color() == ConstantsSimulation.FARBE_SEL) {
                g2.setColor(ConstantsSimulation.C_SPEZIAL);
            } else if (aktPix.color() == ConstantsSimulation.FARBE_RAHMEN) {
                g2.setColor(ConstantsSimulation.C_RAHMEN);
            } else if (aktPix.color() == ConstantsSimulation.FARBE_GGSTD) {
                g2.setColor(ConstantsSimulation.C_GEGENSTAND);
            } else if (aktPix.color() >= 100 && aktPix.color() <= 125) {
                // Benutzerfarben.
                g2.setColor(ConstantsSimulation.C_BENUTZER[aktPix.color() - 100]);
            } else if (aktPix.color() == ConstantsSimulation.FARBE_DURCHLAESSIG) {
                g2.setColor(ConstantsSimulation.C_DURCHLAESSIG);
            } else {
                g2.setColor(this.getBackground());
            }

View Full Code Here

        if (setzen) {
            if (this.feld[x][y] != farbe || unbed) {
                this.feld[x][y] = farbe;
   
                if (!temp) {
                    this.neuerPixel2D = new Pixel2D_08Bit(x, y, farbe);
                    this.setChanged();
                    this.notifyObservers();
                }
            }
        }
View Full Code Here

        if (setzen) {
            if (this.feld[x][y] != farbe || unbed) {
                this.feld[x][y] = farbe;
               
                if (this.existsVideoPlug) {
                    this.drawPixel2D.add(new Pixel2D_08Bit(x, y, farbe));
                }
                   
                // TODO: Nächste IF-Bedingung überflüssig, wenn keine Observer.
                if (this.isVisualized() && !temp) {
                    this.neuerPixel2D = new Pixel2D_08Bit(x, y, farbe);
                    this.setChanged();
                    this.notifyObservers();
                }
            }
        }
View Full Code Here

TOP

Related Classes of eas.math.geometry.Pixel2D_08Bit

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.