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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? omcolor.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// **********************************************************************// // <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/OMColor.java,v $// $RCSfile: OMColor.java,v $// $Revision: 1.2.2.2 $// $Date: 2005/01/10 16:59:43 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.omGraphics;import java.awt.Color;import java.lang.reflect.*;/** * The OMColor exists to provide a way to make a color that can have * some degree of transparency. The class lets you set the alpha value * of the color which lets the color be invisible (0) to opaque (255). * At this time, the java.awt.Graphics class does not support * transparency for drawing objects (OMLines, OMRects, OMCircles, * etc.) but the transparent colors work for OMBitmap and OMRaster * pixel values. * <p> *  * The OMColor object captures all calls that reference the * package-internal <code>java.awt.Color.value</code> slot, and * re-route them through the local argb slot. * <p> *  * NOTE concerning the OpenMap 4.0 release. As of 4.0, OpenMap now has * a minimum jdk 1.2 requirement, which means that OMColor seems to * duplicate java.awt.Color. We're going to keep this class around, * however, in case someone needs a mutable Color. *  * @see com.bbn.openmap.util.ColorFactory */public class OMColor extends Color {    /**     * Does this Java version support alpha for java.awt.Colors?. This     * is true if java.version &gt;= 1.2, and false otherwise.     */    public final static transient boolean nativeAlpha;    /**     * Default transparent color. Clear is a standard color that has     * all the bit values set to zero. This will give you a     * transparent pixel for images, and black for situations where     * tranparency is not supported.     */    public final static transient Color clear;    /**     * A constructor object which can be used to create new     * java.awt.Colors for <code>java.version &gt;= 1.2</code>.     */    public final static transient Constructor alphaValueConstructor;    // check to see if alpha values are supported by the underlying    // java.awt.Color class.    static {        Color c;        Constructor cons;        boolean b;        try {            // we prefer the Java 2 solution (java.awt.Color supports            // alpha)            cons = Color.class.getConstructor(new Class[] { Integer.TYPE,                    Boolean.TYPE });            if (com.bbn.openmap.util.Debug.debugging("env")) {                System.out.println("Alpha supported by java.awt.Color");            }            c = (Color) cons.newInstance(new Object[] { new Integer(0),                    new Boolean(true) });            b = true;        } catch (Exception e) {            // this means we need to hack alphas.            if (com.bbn.openmap.util.Debug.debugging("env")) {                System.out.println("Alpha NOT SUPPORTED by java.awt.Color");            }            cons = null;            c = new OMColor(0);            b = false;        }        clear = c;        alphaValueConstructor = cons;        nativeAlpha = b;    }    /**     * The 32bit ARGB value used.     */    protected int argb;    /**     * Create a color with the specified alpha, red, green, and blue     * components. The four arguments must each be in the range 0-255. // *     *      * @deprecated This function does not correctly override the JDK // *     *             1.2 java.awt.Color constructor with the same     *             type/number of // * arguments. It should be     *             OMColor(int r, int g, int b, int a).     */    public OMColor(int a, int r, int g, int b) {        super(r, g, b);//HACK unnecessary?...        argb = (a << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8)                | ((b & 0xFF) << 0);    }    /**     * Create a color with the specified ARGB (Alpha, Red, Green, and     * Blue) values. The alpha component is in bits 24-31 of the     * argument, the red component is in bits 16-23 of the argument,     * the green component is in bits 8-15 of the argument, and the     * blue component is in bits 0-7.     *      * @param argb 32bit Hex ARGB value     */    public OMColor(int argb) {        super(argb);//HACK unnecessary?...        this.argb = argb;    }    /**     * Create a color with the specified red, green, and blue values,     * where each of the values is in the range 0.0-1.0. The value 0.0     * indicates no contribution from the primary color component. The     * value 1.0 indicates the maximum intensity of the primary color     * component. // *     *      * @deprecated This function does not correctly override the JDK // *     *             1.2 java.awt.Color constructor with the same     *             type/number of // * arguments. It should be     *             OMColor(float r, float g, float b, float a).     */    public OMColor(float a, float r, float g, float b) {        super(r, g, b);//HACK unnecessary?...        argb = (((int) (a * 255)) << 24) | (((int) (r * 255) & 0xFF) << 16)                | (((int) (g * 255) & 0xFF) << 8)                | (((int) (b * 255) & 0xFF) << 0);    }    /**     * Get the ARGB (alpha, red, green and blue) value representing     * the color in the default RGB ColorModel. The alpha, red, green,     * and blue components of the color are each scaled to be a value     * between 0 (abscence of the color) and 255 (complete     * saturation). Bits 24-31 of the returned integer are the alpha     * value, bits 16-23 are the red value, bit 8-15 are the green     * value, and bits 0-7 are the blue value.     *      * @return the integer value of the color.     */    public int getRGB() {        return argb;    }    /**     * Change the ARGB value of the color the input value. See the     * constructor comments that accepts the int parameter.     *      * @param value the transparency value between 0-255.     */    public void setRGB(int value) {        argb = value;    }    /**     * Return the red value of the color (the value of the 16-23     * bits).     *      * @return the integer red value.     */    public int getRed() {        return (argb >> 16) & 0xff;    }    /**     * Set the red value of the OMColor.     *      * @param value the red value between 0-255.     */    public void setRed(int value) {        argb = (argb & 0xFF00FFFF) | ((value & 0xff) << 16);    }    /**     * Return the green value of the color (the value of the 8-15     * bits).     *      * @return the integer green value.     */    public int getGreen() {        return (argb >> 8) & 0xff;    }    /**     * Set the green value of the OMColor.     *      * @param value the green value between 0-255.     */    public void setGreen(int value) {        argb = (argb & 0xFFFF00FF) | ((value & 0xff) << 8);    }    /**     * Return the blue value of the color (the value of the 0-7 bits).     *      * @return the integer blue value.     */    public int getBlue() {        return argb & 0xff;    }    /**     * Set the blue value of the OMColor.     *      * @param value the blue value between 0-255.     */    public void setBlue(int value) {        argb = (argb & 0xFFFFFF00) | (value & 0xff);    }    /**     * Return the transparency value of the color (the value of the     * 24-31 bits).     *      * @return the integer transparency value.     */    public int getAlpha() {        return argb >>> 24;    }    /**     * Set the transparency value of the OMColor.     *      * @param value the transparency value between 0-255.     */    public void setAlpha(int value) {        argb = (argb & 0x00FFFFFF) | (value << 24);    }    /**     * Return a color integer that has the transparency alpha value     * set to a value between 0-255. It cleans out the old alpha     * setting, and inserts the new one.     *      * @param colorValue the ARGB value of a color to be changed.     * @param transValue the integer (0-255) representing the     *        opaqueness of the return value. 0 is transparent, 255 is     *        opaque.     * @return the integer color value with the transparency value.     */    public static int setTransparentValue(int colorValue, int transValue) {        return ((0x00FFFFFF & colorValue) | (transValue << 24));    }    /**     * Return a color value that has the transparency alpha value set     * to a percentage value between 0.0 and 1.0.     *      * @param colorValue the RGB value of a color to be changed.     * @param transValue the percentange of opaqueness (0-1) of the     *        return value. 0 is transparent, 1 is opaque.     * @return the integer color value with the transparency value.     */    public static int setTransparentValue(int colorValue, float transValue) {        return ((0x00FFFFFF & colorValue) | (((int) (transValue * 255)) << 24));    }    /**     * Checks if the color is transparent. The alpha bits (31-24) of     * the color determine this.     *      * @param value Color to be checked     * @return true if Color is null or transparent     */    public static boolean isClear(Color value) {        return (value == null) || ((value.getRGB() >>> 24) == 0);    }    /**     * Computes the hash code for this color.     *      * @return a hash code value for this object.     */    public int hashCode() {        return getRGB();    }    /**     * Determines whether another object is equal to this color.     * <p>     * The result is <code>true</code> if and only if the argument     * is not <code>null</code> and is a <code>Color</code> object     * that has the same alpha, red, green, and blue values as this     * object.     *      * @param obj the Color to compare.     * @return true if the objects are the same, false otherwise.     */    public boolean equals(Object obj) {        return (obj instanceof Color)                && (((Color) obj).getRGB() == this.getRGB());    }    /**     * Returns a string representation of this color. This method is     * intended to be used only for debugging purposes, and the     * content and format of the returned string may vary between     * implementations. The returned string may be empty but may not     * be <code>null</code>.     *      * @return a string representation of this color.     */    public String toString() {        return "{" + super.toString() + " a=" + getAlpha() + "}";    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩中文字幕91| 亚洲韩国精品一区| 在线精品视频一区二区三四| 久久精品免费观看| 成人免费小视频| 久久久久亚洲综合| 欧美高清视频不卡网| 99久久精品免费看国产免费软件| 欧美96一区二区免费视频| 有码一区二区三区| 国产精品国产三级国产有无不卡| 日韩理论片中文av| 2020国产精品| 日韩限制级电影在线观看| 色www精品视频在线观看| 成人午夜私人影院| 国产麻豆日韩欧美久久| 看国产成人h片视频| 午夜视频在线观看一区| 亚洲综合激情小说| 亚洲三级视频在线观看| 国产精品女主播av| 欧美国产综合色视频| 久久久影院官网| 精品国产91洋老外米糕| 51精品久久久久久久蜜臀| 欧美综合天天夜夜久久| 91激情五月电影| 色视频欧美一区二区三区| 91网站在线观看视频| 不卡的av在线| 91蜜桃在线观看| bt欧美亚洲午夜电影天堂| 风间由美一区二区av101| 国产一区二区免费视频| 国产精品伊人色| 国产精品亚洲专一区二区三区 | 日韩和欧美的一区| 亚洲国产日韩精品| 亚洲成人7777| 石原莉奈在线亚洲二区| 男女男精品视频| 麻豆成人久久精品二区三区小说| 日本不卡1234视频| 精品一区二区三区影院在线午夜| 美女视频免费一区| 韩国女主播一区| 成人综合婷婷国产精品久久| 成人午夜私人影院| 色综合久久久久综合体 | www激情久久| 国产日产欧美一区二区三区| 欧美高清在线精品一区| 日韩一区中文字幕| 伊人性伊人情综合网| 亚洲国产精品视频| 美女被吸乳得到大胸91| 国产原创一区二区三区| 国产99久久久国产精品免费看| 99久久精品免费精品国产| 色综合欧美在线| 欧美一区二区三区四区五区 | 一本久久精品一区二区| 欧洲精品视频在线观看| 91精品国产综合久久婷婷香蕉| 日韩三级高清在线| 国产亚洲欧美日韩日本| 1区2区3区国产精品| 五月天激情小说综合| 国产精选一区二区三区| 色综合久久综合| 日韩免费视频一区二区| 欧美极品xxx| 亚洲在线观看免费| 青青国产91久久久久久| 成人黄色国产精品网站大全在线免费观看| 色综合久久综合| 欧美大片顶级少妇| 综合自拍亚洲综合图不卡区| 午夜精品福利在线| 成人黄色小视频| 欧美日本免费一区二区三区| 久久久久久免费毛片精品| 一区二区三区四区高清精品免费观看| 日韩电影免费一区| 成人短视频下载| 欧美一区二区三区思思人| 国产精品欧美综合在线| 亚洲bt欧美bt精品777| 国产精选一区二区三区| 欧美美女一区二区在线观看| 国产女人水真多18毛片18精品视频| 一区二区三区国产豹纹内裤在线| 久久国产福利国产秒拍| 在线亚洲一区观看| 久久精品欧美一区二区三区不卡| 婷婷成人激情在线网| 99精品国产91久久久久久| 日韩欧美国产电影| 亚洲大片精品永久免费| 成人精品国产福利| 欧美成人官网二区| 亚洲一区二区三区四区的| 成人动漫一区二区| 日韩欧美在线综合网| 亚洲综合视频网| 99久久婷婷国产综合精品电影| 精品乱码亚洲一区二区不卡| 亚洲电影一级黄| 日本韩国一区二区三区视频| 日本一区二区三区国色天香| 久久99日本精品| 7777精品久久久大香线蕉| 亚洲欧美成人一区二区三区| 成人国产一区二区三区精品| 久久精品人人做人人综合| 久久精品久久99精品久久| 欧美日韩精品免费| 一区二区激情视频| 91天堂素人约啪| 亚洲丝袜美腿综合| 北条麻妃一区二区三区| 国产欧美日韩久久| 欧美日韩高清影院| 一级特黄大欧美久久久| 91老师片黄在线观看| 亚洲欧美一区二区三区极速播放 | 久久综合99re88久久爱| 久久国内精品自在自线400部| 91精品福利在线一区二区三区| 亚洲综合成人在线视频| 91福利资源站| 亚洲国产综合色| 欧美日韩精品一二三区| 亚洲在线视频网站| 欧美日韩不卡一区| 偷偷要91色婷婷| 日韩一区二区三区免费看 | 日韩欧美中文一区二区| 日产国产欧美视频一区精品| 欧美一区二区视频观看视频| 捆绑调教一区二区三区| 欧美电影免费观看高清完整版在线| 免费成人结看片| 精品处破学生在线二十三| 国产精品亚洲第一区在线暖暖韩国 | 在线精品视频一区二区三四| 亚洲国产色一区| 宅男噜噜噜66一区二区66| 欧美aaaaa成人免费观看视频| 欧美r级在线观看| 国产suv精品一区二区6| 中文字幕日韩av资源站| 91久久精品一区二区| 亚洲成人动漫一区| 日韩视频永久免费| 国产在线精品不卡| 亚洲欧洲无码一区二区三区| 欧美三级中文字幕在线观看| 奇米综合一区二区三区精品视频| 久久久久久久久久久久电影 | 亚洲色图在线播放| 欧美日韩一区不卡| 蜜桃视频在线观看一区| 国产亚洲成av人在线观看导航| 成人app下载| 午夜精品在线视频一区| 欧美精品一区二区三| a亚洲天堂av| 全国精品久久少妇| 国产精品视频第一区| 欧美日韩国产免费| 国产不卡免费视频| 亚洲午夜久久久久久久久久久| 欧美成人国产一区二区| 91污在线观看| 精品一区二区三区在线视频| 中文字幕一区二| 中文字幕一区二区三| 日韩一区二区高清| 成人国产免费视频| 免费高清成人在线| 亚洲精品水蜜桃| 精品美女一区二区三区| 在线观看一区二区视频| 国产一区二区在线视频| 亚洲国产视频一区二区| 中文字幕av一区二区三区高| 3atv在线一区二区三区| av在线一区二区三区| 韩国av一区二区三区| 午夜欧美电影在线观看| 136国产福利精品导航| 日韩写真欧美这视频| 在线观看欧美黄色| 成人免费视频一区二区| 日韩成人dvd| 亚洲电影在线播放| 国产精品免费aⅴ片在线观看| 欧美一区二区高清|