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

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

?? ombitmap.java

?? openmap java寫的開源數(shù)字地圖程序. 用applet實(shí)現(xiàn),可以像google map 那樣放大縮小地圖.
?? JAVA
字號(hào):
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/omGraphics/OMBitmap.java,v $// $RCSfile: OMBitmap.java,v $// $Revision: 1.2.2.3 $// $Date: 2005/08/09 21:17:44 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics;import java.awt.Color;import java.awt.Paint;import java.awt.Toolkit;import java.awt.image.MemoryImageSource;import java.io.Serializable;import com.bbn.openmap.proj.Projection;import com.bbn.openmap.util.Debug;/** * The OMBitmap lets you create a two color image. The display color * is the foreground color, and the fill color is the background * color. OMColors can be used, and their transparency values will be * implemented. * <p> * The array of bytes is used to create the picture. Each bit, * representing a pixel, is examined, and the color is set to the * display or fill color, depending on the bit value. *  * There isn't a height and width restriction on OMBitmaps, but you do * have to be careful about the byte array that is used for one. The * OMBitmap is based on an X bitmap, not a Windows bmp file. Again, * each bit of the bytes corresponds to a pixel. If the height and/or * width of the bitmap isn't a multiple of 8, you have to round up the * number of bytes used so that the excess bits are covered in that * extra byte for the row. * <P> *  * So, for a 4x4 bitmap, you need: *  * <pre> *  *  *  ooooxxxx|ooooxxxx|ooooxxxx|ooooxxxx -&gt; 1 by 4 bytes, 4 bytes total *  *   * </pre> *  * where x's are the bits being used for the bitmap ( and whether they * are 1 or 0 dictates either foreground or background color), and o's * are the leftover bits (they are ignored). The '|' are byte * boundaries. * <P> *  * The bits, per byte, look like they are used in reverse order * because they are - least significant bit, per byte, is used in that * order. * <P> *  * For a 6x6 bitmap: *  * <PRE> *  * ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx -> 1 x 6 * bytes, 6 bytes total *  * </PRE> *  * for a 10x10 bitmap: *  * <PRE> *  * xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx -> * 2 by 10 bytes, 20 bytes total *  * </PRE> *  * There is the ability to add a filter to the OMBitmap, to change * it's appearance for rendering. The most common filter, which is * included as a kind of default, is the scale filter. Filtering the * OMRasterObject replaces the bitmap variable, which is the internal * java.awt.Image used for rendering. */public class OMBitmap extends OMRasterObject implements Serializable {    /** Create empty, and add parameters later. */    public OMBitmap() {        super(RENDERTYPE_UNKNOWN, LINETYPE_UNKNOWN, DECLUTTERTYPE_NONE);    }    /**     * Created a OMBitmap with a Lat/lon placement.     *      * @param lt latitude of upper left corner of bitmap.     * @param ln longitude of upper left corner of bitmap.     * @param w width of bitmap.     * @param h height of bitmap.     * @param bytes byte array of bitmap, each bit representing a     *        pixel.     */    public OMBitmap(float lt, float ln, int w, int h, byte[] bytes) {        super(RENDERTYPE_LATLON, LINETYPE_UNKNOWN, DECLUTTERTYPE_NONE);        lat = lt;        lon = ln;        width = w;        height = h;        bits = bytes;    }    /**     * Create an OMBitmap with a X/Y window placement.     *      * @param x1 window pixel x location of upper left corner of     *        bitmap.     * @param y1 window pixel y location of upper left corner of     *        bitmap.     * @param w width of bitmap.     * @param h height of bitmap.     * @param bytes byte array of bitmap, each bit representing a     *        pixel.     */    public OMBitmap(int x1, int y1, int w, int h, byte[] bytes) {        super(RENDERTYPE_XY, LINETYPE_UNKNOWN, DECLUTTERTYPE_NONE);        x = x1;        y = y1;        width = w;        height = h;        bits = bytes;    }    /**     * Create an OMBitmap, located at a Lat/lon with a X/Y offset     * placement.     *      * @param lt latitude of upper left corner of bitmap.     * @param ln longitude of upper left corner of bitmap.     * @param offset_x1 window pixel x location from ln of upper left     *        corner of bitmap.     * @param offset_y1 window pixel y location from lt of upper left     *        corner of bitmap.     * @param w width of bitmap.     * @param h height of bitmap.     * @param bytes byte array of bitmap, each bit representing a     *        pixel.     */    public OMBitmap(float lt, float ln, int offset_x1, int offset_y1, int w,            int h, byte[] bytes) {        super(RENDERTYPE_OFFSET, LINETYPE_UNKNOWN, DECLUTTERTYPE_NONE);        lat = lt;        lon = ln;        x = offset_x1;        y = offset_y1;        width = w;        height = h;        bits = bytes;    }    /**     * Set the bytes used to create the pixels used to create the     * image. Checks to see of the length*8 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 * 8) != (height * width))            Debug.output("OMBitmap: new byte[] size (" + +values.length                    + ") (*8) doesn't" + " match [height*width (" + height                    * width + ")]");    }    /**     * Create the image pixels from the display color and the fill     * color values, and the bitmap bytes. All of these attributes     * should have been filled in.     *      * @return true if the pixels were successfully created.     */    protected boolean computePixels() {        int foreground, background;        int npix, i, j, k, w;        int[] masks = { 1, 2, 4, 8, 16, 32, 64, 128 };        int nPixels = width * height;        if (bits == null || (bits.length * 8) < nPixels) {            System.err.println("OMBitmap.computePixels(): not enough bits!");            return false;        }        pixels = new int[nPixels];        // Init colors.        Paint paint = getDisplayPaint();        if (paint instanceof Color) {            foreground = ((Color) paint).getRGB();        } else {            foreground = Color.black.getRGB();        }        paint = getFillPaint();        if (paint instanceof Color) {            background = ((Color) paint).getRGB();        } else {            background = OMGraphic.clear.getRGB();        }        int defaultColor = 128 << 24;        // Now, using the foreground and background colors, build a        // set of        // pixels by traversing bitwise through the bitmap data.        // Determine the excess number of bits at the end of each row.        int excess = width % 8; // Remainder        // And how many bytes will be used represent each row?        int bytes_per_row = width / 8;        if (excess > 0) {            Debug.message("omGraphics", "OMBitmap.computePixels(): excess byte");            bytes_per_row++;        }        Debug.message("omGraphics", "OMBitmap.computePixels(): bits.length = "                + bits.length);        for (npix = 0, i = 0; i < height; i++) { // for each row            for (j = 0, w = 0; j < bytes_per_row; j++) { // for each                                                         // row's byte                int idx = (i * bytes_per_row) + j;                for (k = 0; // for each byte's bits                (k < 8) & // bits per byte                        (w < width) & // bits per row                        (npix < nPixels); // bits per bitmap                k++, w++, npix++) {                    int set = masks[k] & bits[idx];                    if (set > 0) {                        pixels[npix] = foreground;                    } else {                        pixels[npix] = background;                    }                }            }        }        if (npix < nPixels - 1) {            for (i = npix; i < nPixels; i++) {                pixels[i] = defaultColor;            }        }        return true;    }    /**     * Create the rendered image from the pixel values.     *      * @return true if the OMBitmap has enough information and     *         generates the rendered image successfully.     */    public boolean generate(Projection proj) {        // Position() sets the bitmap location on the screen!!!!        if (!position(proj)) {            Debug.message("omgraphic",                    "OMBitmap: positioning failed in generate!");            return false;        }        if (getNeedToRegenerate() || bitmap == null) {            computePixels();            Toolkit tk = Toolkit.getDefaultToolkit();            bitmap = tk.createImage(new MemoryImageSource(width, height, pixels, 0, width));        }        if (imageFilter != null) {            bitmap = filterImage();        }        setShape();        setNeedToRegenerate(false);        return true;    }    /**     * This sets the bitmap to recompute the pixels if the foreground     * paint is changed.     *      * @param value the new line color.     */    public void setLinePaint(Paint value) {        super.setLinePaint(value);        if (!selected) {            setNeedToRegenerate(true);        }    }    /**     * This sets the bitmap to recompute the pixels if the foreground     * paint is changed.     *      * @param value the new select color.     */    public void setSelectPaint(Paint value) {        super.setSelectPaint(value);        if (selected) {            setNeedToRegenerate(true);        }    }    /**     * This sets the bitmap to recompute the pixels if the background     * color is changed.     *      * @param value the new background color     */    public void setFillPaint(Paint value) {        super.setFillPaint(value);        setNeedToRegenerate(true);    }    /**     * Set the selected attribute to true, and sets the color to the     * select color.     */    public void select() {        if (!isSelected()) {            super.select();            setNeedToRegenerate(true);        }    }    /**     * Set the selected attribute to false, sets the color to the line     * color.     */    public void deselect() {        if (isSelected()) {            super.deselect();            setNeedToRegenerate(true);        }    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产色爱av资源综合区| 中文字幕一区二区三区av| 视频一区免费在线观看| 91久久精品一区二区三区| 中文字幕日韩精品一区| 国产福利一区二区三区视频在线| 欧美精品一区二区三区久久久| 美女视频免费一区| 日韩午夜三级在线| 日本成人在线电影网| 777色狠狠一区二区三区| 午夜精品久久久久久久久| 欧美性色黄大片| 亚洲一区二区综合| 欧美午夜理伦三级在线观看| 亚洲一区二区三区四区五区中文| 欧美自拍偷拍午夜视频| 亚洲福利一区二区| 欧美男生操女生| 青青草精品视频| 日韩精品在线网站| 国内偷窥港台综合视频在线播放| 久久久久99精品国产片| 国产成人午夜精品5599| 国产色91在线| 99精品国产91久久久久久 | 日韩一级免费一区| 另类小说综合欧美亚洲| 欧美xxxx在线观看| 国产成人99久久亚洲综合精品| 国产精品国产三级国产普通话蜜臀| 99视频精品全部免费在线| 亚洲日本青草视频在线怡红院| 色噜噜夜夜夜综合网| 亚洲成人av一区二区| 欧美日韩国产另类一区| 喷水一区二区三区| 久久久久久久久免费| 成人黄色网址在线观看| 亚洲综合色成人| 日韩一二在线观看| 国产sm精品调教视频网站| 亚洲桃色在线一区| 欧美精品久久天天躁| 裸体一区二区三区| 欧美国产综合色视频| 一本色道久久综合亚洲91| 午夜精品免费在线观看| 2017欧美狠狠色| 91亚洲永久精品| 日韩电影在线一区二区三区| 欧美tickling挠脚心丨vk| 懂色av中文字幕一区二区三区 | 久久先锋资源网| www.av亚洲| 天天综合天天综合色| 欧美精品一区二区高清在线观看| 波多野结衣中文字幕一区二区三区 | 欧美视频中文一区二区三区在线观看| 日韩电影一区二区三区| 中文字幕精品在线不卡| 欧美亚洲日本国产| 国内精品不卡在线| 伊人开心综合网| 日韩欧美综合一区| 99精品视频在线播放观看| 免费成人小视频| 中文字幕一区二区三区不卡| 欧美一区国产二区| www.爱久久.com| 久久99精品一区二区三区| 国产精品福利在线播放| 91精品国产综合久久久久久久| 风流少妇一区二区| 三级精品在线观看| 国产精品免费视频一区| 欧美一级二级三级蜜桃| 91在线观看视频| 久久激情综合网| 一区二区三区久久久| 精品久久久久久久久久久久包黑料 | 日韩精品一级中文字幕精品视频免费观看| 亚洲精品一区二区精华| 欧美主播一区二区三区美女| 韩国一区二区三区| 亚洲国产成人av网| 中文成人av在线| 欧美xingq一区二区| 欧美性生交片4| 99久久综合国产精品| 久久99精品国产91久久来源| 亚洲伊人伊色伊影伊综合网| 欧美激情在线免费观看| 日韩天堂在线观看| 欧美日韩综合在线| av一区二区三区四区| 九九九久久久精品| 日韩电影在线一区二区三区| 亚洲女爱视频在线| 国产免费观看久久| 欧美成人一区二区| 欧美精选一区二区| 91久久精品一区二区三区| 成人动漫精品一区二区| 国产主播一区二区| 蜜臀av性久久久久蜜臀aⅴ| 亚洲一区在线观看视频| 中文字幕日韩一区二区| 国产拍欧美日韩视频二区| 欧美不卡123| 日韩一区二区电影| 欧美人牲a欧美精品| 色婷婷狠狠综合| 99免费精品在线观看| 成人av免费在线观看| 国产福利91精品一区二区三区| 六月丁香婷婷久久| 蜜臀a∨国产成人精品| 午夜精品久久久久久久久| 亚洲一二三四久久| 亚洲综合免费观看高清在线观看| 亚洲色图在线视频| 综合欧美亚洲日本| 国产精品久久久久四虎| 国产日产欧美一区| 久久精品视频一区二区| 欧美精品一区视频| 久久亚洲一级片| 国产亚洲综合性久久久影院| 久久精品夜色噜噜亚洲aⅴ| 精品国产一区二区三区四区四| 日韩一级片在线观看| 日韩欧美一二三四区| 精品蜜桃在线看| 久久美女高清视频| 久久精品人人做人人综合| 久久久亚洲高清| 国产亚洲一区字幕| 中文字幕av不卡| 国产精品久久国产精麻豆99网站| 1区2区3区国产精品| 自拍偷拍国产精品| 一区二区在线看| 亚洲成人精品一区二区| 日韩激情视频在线观看| 麻豆freexxxx性91精品| 韩国成人福利片在线播放| 国产精品中文欧美| 处破女av一区二区| av在线免费不卡| 欧美综合视频在线观看| 777久久久精品| 久久这里都是精品| 欧美国产精品中文字幕| 亚洲码国产岛国毛片在线| 亚洲一区二区高清| 免费在线观看一区二区三区| 精品一区二区三区视频| 成人久久视频在线观看| 色综合天天综合网天天看片| 在线观看中文字幕不卡| 欧美性色综合网| 日韩精品一区二| 国产精品色在线观看| 伊人性伊人情综合网| 美国一区二区三区在线播放| 国产精品一区二区久激情瑜伽 | 7777精品伊人久久久大香线蕉| 日韩免费高清av| 日韩精品视频网| 另类调教123区 | 97久久精品人人澡人人爽| 在线观看免费视频综合| 日韩欧美黄色影院| 国产精品嫩草久久久久| 亚洲va欧美va人人爽午夜| 久久国产尿小便嘘嘘| 9色porny自拍视频一区二区| 欧美美女一区二区| 久久久久国产精品厨房| 一区二区三区鲁丝不卡| 韩国三级中文字幕hd久久精品| 91在线视频免费观看| 这里只有精品99re| 国产欧美一区二区精品仙草咪| 一区二区三区免费观看| 激情六月婷婷久久| 91女厕偷拍女厕偷拍高清| 91精品国产综合久久精品app | 26uuu国产电影一区二区| 中文字幕亚洲欧美在线不卡| 视频一区视频二区中文字幕| 成人丝袜18视频在线观看| 欧美精品一级二级三级| 亚洲国产精品成人综合| 午夜精品福利一区二区三区av | 国产色一区二区| 日日噜噜夜夜狠狠视频欧美人| 国产91露脸合集magnet| 欧美精品黑人性xxxx|