亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? omraster.java

?? openmap java寫的開源數(shù)字地圖程序. 用applet實(shí)現(xiàn),可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
     * the pixel array.     *      * @param x x location of pixel, from the left side of image.     * @param y y location of pixel, from the top of image.     * @return true if location within pixel array.     */    private boolean boundsSafe(int x, int y) {        if ((y < 0) || (y >= height) || (x < 0) || (x >= width)) {            return false;        }        return true;    }    /**     * Set the ImageIcon.     *      * @param img ImageIcon     */    public void setImageIcon(ImageIcon img) {        setImage(img.getImage());    }    /**     * Set the image pixel value at a location.     *      * @param x Horizontal location of pixel from left.     * @param y Vertical location of pixel from top.     * @param colorValue the color value of the pixel.     * @return true if x, y location valid.     */    public boolean setPixel(int x, int y, int colorValue) {        if (boundsSafe(x, y)) {            pixels[(y * width) + x] = colorValue;            setNeedToRegenerate(true);            return true;        }        return false; //fail    }    /**     * Get the image pixel value at a locaiton.     *      * @param x Horizontal location of pixel from left.     * @param y Vertical location of pixel from top.     * @return the integer color value of the image at x, y     */    public int getPixel(int x, int y) {        if (boundsSafe(x, y)) {            return pixels[(y * width) + x];        }        return 0; //fail - but also the ct[0] - hmmmmm.    }    /**     * Set image byte data, for index frame using colortable.     *      * @param x Horizontal location of pixel from left.     * @param y Vertical location of pixel from top.     * @param ctIndex The array index of the applicable color in the     *        color table.     * @return true if x, y location valid.     */    public boolean setByte(int x, int y, byte ctIndex) {        if (boundsSafe(x, y) && bits != null) {            bits[(y * width) + x] = ctIndex;            setNeedToRegenerate(true);            return true;        }        return false; //fail    }    /**     * Get image byte data, which the index to a colortable for     * indexed images.     *      * @param x Horizontal location of pixel from left.     * @param y Vertical location of pixel from top.     * @return byte value of bytes(x, y)     */    public byte getByte(int x, int y) {        if (boundsSafe(x, y) && bits != null) {            return bits[(y * width) + x];        }        return 0; //fail - but also the ct[0] - hmmmmm.    }    /**     * Set the bytes used to create the pixels used to create the     * image. Checks to see of the length matches the height * width,     * but doesn't do anything if they don't match, except print out a     * warning. Make sure it does.     *      * @param values byte values containing bit pixel values.     */    public void setBits(byte[] values) {        super.setBits(values);        if ((values.length) != (height * width))            Debug.output("OMBitmap: new byte[] size (" + +values.length                    + ") doesn't" + " match [height*width (" + height * width                    + ")]");    }    /**     * Set the transparency of the index type images. For the Direct     * Colormodel the pixel data needs to be reconstructed, so this is     * an O(pixels.length) operation. For an indexed colormodel, the     * data still needs to be reconstructed, but it will cost you the     * time in generate(). The transparency value should be a number     * between 0-255.     *      * @param value New value of the alpha value for the image.     */    public void setTransparent(int value) {        value &= 0x000000ff;        if (transparent == value)            return;        transparent = value;        setNeedToRegenerate(true);        if (bits != null) {            pixels = null;            computePixels();        } else {            value <<= 24;//move to alpha position            // direct color model, touch each pixel in the image            for (int i = 0; i < pixels.length; i++) {                //  Do this if we want to support images that have                //  transparent pixels, and we want each pixel to have                //  the most transparent pixel.                // Why don't we want to do this??? DFD                //              int pixAlpha = 0xFF000000 & pixels[i];                //              pixAlpha = (pixAlpha < value)?pixAlpha:value;                //              pixels[i] = (0x00ffffff & pixels[i]) | pixAlpha;                pixels[i] = (0x00ffffff & pixels[i]) | value;            }        }    }    /**     * Get the transparent setting of the image.     *      * @return the transparent value (0-255) of the image.     */    public int getTransparent() {        return transparent;    }    /**     * Set the color table to the int RGB values passed in. Valid for     * the indexed colormodel only. The pixels will be colored     * according to these values.     *      * @param values array of color RGB values.     */    public void setColors(int[] values) {        if (colorModel != COLORMODEL_INDEXED) {            Debug.output("OMRaster: Setting colors for final "                    + "colortable when a colortable isn't needed!");        } else {            colors = values;            setNeedToRegenerate(true);        }    }    /**     * Set the color table according to the java.awt.Color array     * passed in. Valid for the indexed colormodel only. The pixels     * will be colored according to these values. The transparency     * values of these colors will only take effect of they are less     * than the transparency value of the images' value.     *      * @param values array of java.awt.Color colors.     */    public void setColors(Color[] values) {        if (colorModel != COLORMODEL_INDEXED) {            Debug.output("OMRaster: Setting colors for final colortable when a colortable isn't needed!");            return;        } else if (values == null || values.length == 0) {            colors = new int[0];            Debug.output("OMRaster: What are you trying to do to me?!? The colortables gots to have values!");            return;        } else {            if (values.length > 0) {                colors = new int[values.length];                boolean allTransparent = true;                int trans = (transparent << 24) & 0xff000000;                // Turn the color table into a table using the                // default OMava color model.                for (int i = 0; i < values.length; i++) {                    //  The transparent field can be set for the whole                    //  image, while the open part of the colortable                    // entry                    //  structure is the transparent setting for that                    //  particular color.                    if (transparent < 255) {                        int argb = values[i].getRGB();                        if (values[i].getAlpha() > transparent) {                            // If the transparent value of the pixel                            // is                            // lower than the transparency value, keep                            // that instead - don't make things more                            // visible then they were.                            colors[i] = (0x00ffffff & argb) | trans;                        } else {                            colors[i] = argb;                        }                    } else {                        colors[i] = values[i].getRGB();                    }                    //  Just check if all the colors are transparent -                    //  this is a pain to figure out if you are                    //  getting colors from some server that doesn't                    //  know about alpha values.                    if (allTransparent && ((colors[i] >>> 24) != 0)) {                        allTransparent = false;                    }                }                if (DEBUG && allTransparent) {                    Debug.output("OMRaster: **Whasamatta?** Image created with all transparent pixels!");                }            }            //This is wrong - we do need to force a computePixels,            // but in generate...            //      computePixels();            // This will do it....            pixels = null;            setNeedToRegenerate(true);        }    }    /**     * Get the array of colors used in the indexed color model. If the     * image is not a indexed colormodel, the int[] will be null.     *      * @return color int[] if index colormodel, null otherwise.     */    public int[] getColors() {        return colors;    }    /////////////////////////////////////////////////////////    /**     * Compute pixels is the function that resolves the color table     * into pixel integer values used in the Image. It uses the bits     * as indexes into the color table, and builds a big array of ints     * to use in the bitmap image. If the bits are null, then the     * object was created in the direct color model where the colors     * are already built into the pixels. SO, if you call this, the     * pixels have to be null and the bits good indexes into the     * colortable.     *      * @return true if the image is OK to draw after this function.     */    protected boolean computePixels() {        if (DEBUG)            Debug.output("OMRaster.compute pixels!");        int i;        if (colorModel != COLORMODEL_INDEXED) {            return true;        }        if (colors == null || colors.length == 0) {            Debug.error("OMRaster: attempting to compute pixels without color table!");            return false;        }        int nPixels = width * height;        if (DEBUG) {            Debug.output("Computing pixels for image size:" + width + ", "                    + height);        }        // pixels are the image pixels        pixels = new int[nPixels];        // Now, using the new constructed color table, build a set of        // pixels.        // alpha is a ready, shifted version of the overall        // transparency value;        int alpha = (transparent << 24) & 0xff000000;        // numColors is the number of colors.        int numColors = colors.length;        for (i = 0; i < nPixels; i++) {            byte b = bits[i];            int color;            // make the alpha for this color the lessor of what the            // colortable is, versus the transparent value            //              int pixAlpha;            try {                if (b >= numColors) {                    if (DEBUG)                        Debug.output("OMRaster:.computePixels() problem!: " + b);                    color = clear.getRGB();                } else if (b < 0) {                    color = colors[MoreMath.signedToInt(b)];                } else {                    color = colors[b];                }            } catch (ArrayIndexOutOfBoundsException aiiobe) {                // If the color can't be found, don't paint it.                if (DEBUG) {                    Debug.output("OMRaster.computePixels() problem, can't find color for index: "                            + aiiobe.getMessage());                }                color = clear.getRGB();            }            // OK, got an int value, argb, for the color to be put on            // the pixel. Now we need to straighten out the            // transparency.            if (transparent < 255 && ((color >> 24) > transparent)) {                // this means that the overall transparency should be                // more (lower number, more transparent) than the                // pixel color.                color = alpha | (0x00FFFFFF & color);            } // Otherwise, just go with the alpha value set on the              // color...            pixels[i] = color;        }        return true;    }    /**     * Prepare the graphics for rendering. For all image types, it     * positions the image relative to the projection. For direct and     * indexed colormodel images, it creates the ImageIcon used for     * drawing to the window (internal to object). For indexed     * colormodel images, it also calls computePixels, to resolve the     * colortable and the bytes to create the image pixels.     *      * @param proj Projection used to position the image on the     *        window.     * @return true if the image is ready to paint.     */    public boolean generate(Projection proj) {        // Position sets the position for the OMRaster!!!!        if (!position(proj)) {            if (DEBUG) {                Debug.error("OMRaster.generate(): positioning failed!");            }            return false;        }        // We used to just return here if the OMRaster didn't need to        // be regenerated, but that didn't create the shape properly.        if (getNeedToRegenerate()) {            if (colorModel != COLORMODEL_IMAGEICON) {                // This section is for the indexed color model rasters                // that                // need to resolve the colormap to the bit array                // indexs.                boolean allsWell = true;                // If pixels == null, then computePixels has not been                // called                if (pixels == null) {                    allsWell = false;                    if (bits != null)                        allsWell = computePixels();                    if (!allsWell) {                        Debug.output("OMRaster: attempted to generate without pixels defined!");                        return false;                    }                    //                  Debug.output("OMRaster.generate: length(pixels)                    // = " +                    //                               pixels.length);                }                bitmap = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);                ((BufferedImage) bitmap).setRGB(0,                        0,                        width,                        height,                        pixels,                        0,                        width);            }            // REPLACING bitmap with the filtered version - keep a            // copy            // yourself if you need the original!!! i.e. for            // COLORMODEL_IMAGEICON            if (imageFilter != null) {                bitmap = filterImage();            }        }        // generate shape that is a boundary of the generated image.        // We'll make it a GeneralPath rectangle.        setShape();        setNeedToRegenerate(false);        return true;    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区综合| 一区二区三区在线不卡| 日韩欧美123| 欧美久久免费观看| 精品视频一区二区三区免费| 欧美亚男人的天堂| 欧美丝袜第三区| 这里只有精品99re| 日韩免费观看高清完整版| 26uuu国产一区二区三区| 久久久午夜精品理论片中文字幕| 久久网这里都是精品| 国产精品美女视频| 一区二区三区免费| 日韩精品福利网| 久久97超碰色| 成人午夜电影小说| 色爱区综合激月婷婷| 欧美高清性hdvideosex| 精品国产乱码久久久久久久久| 国产欧美日韩在线视频| 亚洲免费在线看| 天堂一区二区在线| 狠狠色2019综合网| thepron国产精品| 欧美在线小视频| 91精品国产综合久久久蜜臀粉嫩 | 成人小视频在线| 色综合一区二区| 欧美一级理论性理论a| 久久精品一区二区三区四区| 亚洲日本成人在线观看| 日本在线不卡视频一二三区| 国产福利一区在线| 欧美男生操女生| 久久精品欧美一区二区三区不卡| 亚洲美腿欧美偷拍| 精品一区二区在线视频| 色域天天综合网| 日韩免费观看2025年上映的电影| 日韩一区中文字幕| 久久精品国产精品亚洲红杏| 91猫先生在线| 久久久国产午夜精品 | 在线电影国产精品| 中文字幕欧美国产| 久久精品二区亚洲w码| 一本大道久久a久久精二百| 久久久亚洲国产美女国产盗摄| 亚洲一级电影视频| 成人h精品动漫一区二区三区| 91精品国产色综合久久不卡蜜臀| 国产三级精品视频| 亚洲伊人伊色伊影伊综合网| 成人自拍视频在线观看| 日韩一区二区免费在线电影| 亚洲免费大片在线观看| 国产精品亚洲专一区二区三区| 欧美日韩中文国产| 一区二区在线看| jlzzjlzz国产精品久久| 国产日韩成人精品| 精品一区二区影视| 欧美二区三区91| 亚洲3atv精品一区二区三区| 色综合天天综合狠狠| 国产精品国产三级国产普通话蜜臀| 美女国产一区二区三区| 91精品国产综合久久久久| 亚洲人午夜精品天堂一二香蕉| 国产专区欧美精品| www国产成人免费观看视频 深夜成人网| 亚洲五月六月丁香激情| 欧洲色大大久久| 亚洲自拍与偷拍| 欧美影视一区在线| 亚洲大片免费看| 欧美美女视频在线观看| 亚洲成人av一区二区三区| 欧美日韩免费观看一区三区| 亚洲超丰满肉感bbw| 欧美日本在线观看| 蜜臀a∨国产成人精品| 日韩欧美专区在线| 麻豆视频观看网址久久| 26uuu色噜噜精品一区| 国产91高潮流白浆在线麻豆| 久久精品亚洲精品国产欧美| 国产精品一区三区| 欧美国产精品一区| 色老综合老女人久久久| 亚洲国产精品影院| 91精品国产aⅴ一区二区| 九九热在线视频观看这里只有精品| 日韩欧美国产综合一区| 国产精品性做久久久久久| 国产精品久久久久久久久免费桃花| a4yy欧美一区二区三区| 亚洲一区二区三区激情| 日韩一区二区在线看片| 国产精品99久久久久久似苏梦涵 | 中国av一区二区三区| 色天使久久综合网天天| 午夜国产精品一区| 欧美电视剧在线看免费| 99久久精品国产导航| 日韩高清不卡在线| 欧美成人精品福利| 91美女福利视频| 毛片一区二区三区| 国产精品久久久久天堂| 欧美吞精做爰啪啪高潮| 国产精品综合一区二区| 亚洲摸摸操操av| 亚洲精品一区二区三区在线观看| 91美女福利视频| 麻豆成人综合网| 亚洲一区av在线| 国产精品动漫网站| 欧美一区二区在线播放| 91丝袜国产在线播放| 老鸭窝一区二区久久精品| 1024精品合集| 欧美一区二区三区免费| 色婷婷综合五月| 国产高清精品网站| 蜜桃精品在线观看| 亚洲一区在线观看视频| 日韩一区日韩二区| 久久婷婷综合激情| 欧美一级一区二区| 欧美亚一区二区| 91麻豆精品秘密| 成人三级伦理片| 国产一区二区中文字幕| 麻豆一区二区三区| 五月天久久比比资源色| 亚洲伦在线观看| 中文字幕亚洲一区二区va在线| 精品91自产拍在线观看一区| 666欧美在线视频| 精品视频1区2区| 欧美日韩在线播放三区四区| 欧洲av在线精品| 色狠狠色狠狠综合| 91成人在线免费观看| 成人a级免费电影| 丰满亚洲少妇av| 国产不卡视频一区二区三区| 国产乱一区二区| 成人一级黄色片| 成年人网站91| 91久久精品午夜一区二区| 在线亚洲一区二区| 欧美中文字幕亚洲一区二区va在线| 日本高清不卡在线观看| 91网站黄www| 欧美色爱综合网| 欧美精品在线观看播放| 欧美一区二区三区小说| 精品国产亚洲在线| 国产网站一区二区| 国产精品毛片高清在线完整版| 欧美国产激情一区二区三区蜜月| 国产精品看片你懂得| 亚洲欧洲日韩一区二区三区| 一区二区三区资源| 视频一区在线播放| 韩日欧美一区二区三区| 成人久久视频在线观看| 色综合天天性综合| 欧美精品丝袜中出| 日韩欧美一区二区在线视频| 久久久久久久综合| 亚洲色图在线看| 亚洲不卡在线观看| 激情欧美日韩一区二区| 国产大陆a不卡| 制服丝袜国产精品| 国产清纯白嫩初高生在线观看91| 亚洲欧洲成人自拍| 亚洲图片你懂的| 美国十次综合导航| 成人免费高清视频| 91成人看片片| 久久亚洲精品国产精品紫薇| 久久嫩草精品久久久精品| 亚洲永久免费av| 国产精品 日产精品 欧美精品| 国产激情91久久精品导航| 在线亚洲+欧美+日本专区| 欧美色精品天天在线观看视频| www亚洲一区| 亚洲高清久久久| 久久99久久精品| 在线精品国精品国产尤物884a| 97久久精品人人做人人爽| 欧美性感一类影片在线播放| 国产人成亚洲第一网站在线播放| 亚洲日本成人在线观看|