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

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

?? omtext.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        ret.append("-*");        // -average width(of each letter, in tenths of a pixel)        ret.append("-*");        // -character set(like an ISO designation.        ret.append("-*");        // System.out.println("SText.fontString: " + ret);        return ret.toString();    }    /**     * Counts occurences of a character in a string.     *      * @param str the String     * @param ch the character to count     * @return the number of occurences     */    protected int countChar(String str, int ch) {        int fromIndex = 0;        int count = 0;        while ((fromIndex = str.indexOf(ch, fromIndex)) != -1) {            count++;            fromIndex++; // increment past current index            // so we don't pick up the same            // instance again.        }        return count;    }    /**     * Breaks the text down into separate lines. Sets the cache field     * <code>parsedData</code>.     *      * @see #parsedData     */    protected void parseData() {        if (parsedData == null) {            if (data == null)                data = "";            int nLines = countChar(data, '\n') + 1;            if (nLines <= 1) {                parsedData = new String[1];                parsedData[0] = data;            } else {                int i = 0;                int fromIndex = 0;                int toIndex = 0;                parsedData = new String[nLines];                while ((toIndex = data.indexOf('\n', fromIndex)) != -1) {                    parsedData[i] = data.substring(fromIndex, toIndex);                    fromIndex = toIndex + 1;                    i++;                }                parsedData[nLines - 1] = data.substring(fromIndex,                        data.length());            }        }    }    /**     * Computes the widths of each line of the text. Sets the cache field     * <code>widths</code>.     *      * @param fm the metrics to use for computation.     *      * @see #widths     */    protected void computeStringWidths(FontMetrics fm) {        if (widths == null && fm != null) {            int nLines = parsedData.length;            widths = new int[nLines];            for (int i = 0; i < nLines; i++) {                widths[i] = fm.stringWidth(parsedData[i]);            }        }    }    /**     * This function can be called to initialize the internals such as height     * and width of OMText. Lets you use the graphics, and thus the FontMetrics     * object, to figure out the dimensions of the text in order to manipulate     * the placement of the text on the map. These internals were otherwise     * initialized only when render function was called.     *      * @param g the java.awt.Graphics to put the string on.     */    public synchronized void prepareForRender(Graphics g) {        parseData();        g.setFont(getFont());        if (fm == null) {            fm = g.getFontMetrics();        }        computeBounds();    }    /**     * Renders the text onto the given graphics. Sets the cache field     * <code>fm</code>.     *      * @param g the java.awt.Graphics to put the string on.     *      * @see #fm     */    public synchronized void render(Graphics g) {        // copy the graphic, so our transform doesn't cascade to        // others...        g = g.create();        if (getNeedToRegenerate() || pt == null || !isVisible())            return;        g.setFont(getFont());        setGraphicsForEdge(g);        if (fm == null) {            fm = g.getFontMetrics();        }        computeBounds();        // If there is a rotation angle, the shape will be calculated        // for that rotation. Don't need to rotate the Graphics for        // the shape.        if (shouldRenderFill()) {            setGraphicsForFill(g);            fill(g);            if (textureMask != null && textureMask != fillPaint) {                setGraphicsColor(g, textureMask);                fill(g);            }        }        if (isMatted()) {            if (isSelected()) {                setGraphicsColor(g, getSelectPaint());            } else {                setGraphicsColor(g, getMattingPaint());            }            draw(g);        }        // to use later to unset the transform, if used.        double rx = 0.0;        double rw = 0.0;        double woffset = 0.0;        if (g instanceof Graphics2D && rotationAngle != DEFAULT_ROTATIONANGLE) {            Rectangle rect = polyBounds.getBounds();            rx = rect.getX();            rw = rect.getWidth();            woffset = 0.0;            switch (justify) {            case JUSTIFY_LEFT:                // woffset = 0.0;                break;            case JUSTIFY_CENTER:                woffset = rw / 2;                break;            case JUSTIFY_RIGHT:                woffset = rw;            }            // rotate about our text anchor point            ((Graphics2D) g).rotate(rotationAngle, rx + woffset, pt.y);        }        setGraphicsForEdge(g);        int height;        if (fmHeight == HEIGHT) {            height = fm.getHeight();        } else if (fmHeight == ASCENT_LEADING) {            height = fm.getHeight() - fm.getDescent();        } else if (fmHeight == ASCENT_DESCENT) {            height = fm.getAscent() + fm.getDescent();        } else {            height = fm.getAscent();        }        int baselineLocation = pt.y; // baseline ==        // BASELINE_BOTTOM,        // normal.        if (baseline == BASELINE_MIDDLE) {            baselineLocation += (fm.getAscent() - fm.getDescent()) / 2;        } else if (baseline == BASELINE_TOP) {            baselineLocation += (fm.getAscent() - fm.getDescent());        }        switch (justify) {        case JUSTIFY_LEFT:            // Easy case, just draw them.            for (int i = 0; i < parsedData.length; i++) {                renderString(g, parsedData[i], pt.x, baselineLocation                        + (height * i));            }            break;        case JUSTIFY_CENTER:            computeStringWidths(fm);            for (int i = 0; i < parsedData.length; i++) {                renderString(g,                        parsedData[i],                        pt.x - (widths[i] / 2),                        baselineLocation + (height * i));            }            break;        case JUSTIFY_RIGHT:            computeStringWidths(fm);            for (int i = 0; i < parsedData.length; i++) {                renderString(g,                        parsedData[i],                        pt.x - widths[i],                        baselineLocation + (height * i));            }            break;        }    }    protected void renderString(Graphics g, String string, int x, int y) {        if (g instanceof Graphics2D) {            Graphics2D g2 = (Graphics2D) g;            if (getTextMatteColor() != null) {                FontRenderContext context = g2.getFontRenderContext();                GlyphVector glyphVector = g2.getFont()                        .createGlyphVector(context, string);                Shape outline = glyphVector.getOutline();                g2.translate(x, y);                g2.setStroke(getTextMatteStroke());                g2.setColor(getTextMatteColor());                g2.draw(outline);                g2.translate(-x, -y);                g2.setColor(getLineColor());            }        }        g.drawString(string, x, y);    }    /**     * Computes the bounding polygon. Sets the cache field     * <code>polyBounds</code>.     *      * @see #polyBounds     */    protected void computeBounds() {        if (parsedData == null) {            parseData();        }        if (polyBounds == null && pt != null && fm != null) {            // System.out.println("\tcomputing poly bounds");            int xoffset = 0;            int i;            int height;            int descent;            if (fmHeight == HEIGHT) {                height = fm.getHeight();                descent = fm.getDescent();            } else if (fmHeight == ASCENT_DESCENT) {                height = fm.getAscent();                descent = fm.getDescent();            } else if (fmHeight == ASCENT_LEADING) {                height = fm.getHeight() - fm.getDescent();                descent = 0;            } else {                height = fm.getAscent();                descent = 0;            }            int nLines = parsedData.length;            polyBounds = new Polygon();            computeStringWidths(fm);            int baselineOffset = 0; // baseline == BASELINE_BOTTOM,            // normal.            if (baseline == BASELINE_MIDDLE) {                baselineOffset = descent / 2;            } else if (baseline == BASELINE_TOP) {                baselineOffset = descent;            }            // or, baselineOffset = height - (baseline * height /2);            // But that depends on the actual values of the BASELINE            // values, which doesn't seem safe.            /*             * pt.y is bottom of first line, currenty is initialized to top of             * first line, minus any offset introduced by baseline adjustments.             */            int currenty = pt.y + descent - height - baselineOffset;            // First, all the line endpoints.            for (i = 0; i < nLines; i++) {                switch (justify) {                case JUSTIFY_LEFT:                    xoffset = widths[i];                    break;                case JUSTIFY_CENTER:                    xoffset = widths[i] / 2;                    break;                case JUSTIFY_RIGHT:                    xoffset = 0;                    break;                }                // top of line                polyBounds.addPoint(pt.x + xoffset, currenty);                currenty += height;                // bottom of line                polyBounds.addPoint(pt.x + xoffset, currenty);            }            // Next, all line startpoints (the left side)            for (i = nLines - 1; i >= 0; i--) {                switch (justify) {                case JUSTIFY_LEFT:                    xoffset = 0;                    break;                case JUSTIFY_CENTER:                    xoffset = -widths[i] / 2;                    break;                case JUSTIFY_RIGHT:                    xoffset = -widths[i];                    break;                }                polyBounds.addPoint(pt.x + xoffset, currenty);                currenty -= height;                polyBounds.addPoint(pt.x + xoffset, currenty);            }            if (polyBounds != null) {                if (useMaxWidthForBounds) {                    setShape(new GeneralPath(polyBounds.getBounds()));                } else {                    setShape(new GeneralPath(polyBounds));                }                // Make sure the shape takes into account the current                // rotation angle. Code taken from generate() method,                // so it should match up with the drawn text.                if (rotationAngle != DEFAULT_ROTATIONANGLE) {                    Rectangle rect = polyBounds.getBounds();                    double rx = rect.getX();                    double rw = rect.getWidth();                    double woffset = 0.0;                    switch (justify) {                    case JUSTIFY_LEFT:                        // woffset = 0.0;                        break;                    case JUSTIFY_CENTER:                        woffset = rw / 2;                        break;                    case JUSTIFY_RIGHT:                        woffset = rw;                    }                    AffineTransform at = new AffineTransform();                    at.rotate(rotationAngle, rx + woffset, pt.y);                    PathIterator pi = shape.getPathIterator(at);                    GeneralPath gp = new GeneralPath();                    gp.append(pi, false);                    shape = gp;                }            }        } else {            if (Debug.debugging("omtext")) {                Debug.output("OMText.computeBounds() didn't compute because polybounds = "                        + polyBounds                        + " or  pt = "                        + pt                        + " or fm = "                        + fm                        + ", (only polybounds should be null)");            }        }    }    /**     * Return the shortest distance from the OMText to an XY-point.     * <p>     *      * This method uses the OMText's internal Shape object, created from the     * boundary of the text, as its boundary.     *      * @param x X coordinate of the point.     * @param y Y coordinate of the point.     * @return float distance, in pixels, from graphic to the point. Returns     *         Float.POSITIVE_INFINITY if the graphic isn't ready (ungenerated).     */    public float distance(int x, int y) {        return _distance(x, y);    }    protected boolean hasLineTypeChoice() {        return false;    }    /**     * Write this object to a stream.     */    private void writeObject(ObjectOutputStream oos) throws IOException {        oos.defaultWriteObject();        // Write the Font. Take into account the font member could be        // null, although this is unlikely it never hurts to        // protect one's self.        boolean writeFont = (f != OMText.DEFAULT_FONT);        // First write a flag indicating if a Font is on the stream.        oos.writeBoolean(writeFont);        // Write the Font data if a font is on this object.        if (writeFont) {            oos.writeObject(f.getName());            oos.writeInt(f.getSize());            oos.writeInt(f.getStyle());        }    }    /**     * Reconstitute from an ObjectInputStream.     */    private void readObject(ObjectInputStream ois)            throws ClassNotFoundException, IOException {        ois.defaultReadObject();        // Get the flag form the stream        boolean hasFont = ois.readBoolean();        if (hasFont) {            String name = (String) ois.readObject();            int size = ois.readInt();            int style = ois.readInt();            f = new Font(name, style, size);        } else {            f = OMText.DEFAULT_FONT;        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕不卡一区| 久久综合狠狠综合久久激情| 蜜桃av一区二区三区| 日本一区二区三区高清不卡| 色综合中文字幕国产 | 日韩欧美二区三区| 91丨porny丨国产| 精品系列免费在线观看| 一区二区日韩av| 国产亚洲人成网站| 欧美一区午夜视频在线观看| 色狠狠一区二区| 国产剧情一区二区三区| 亚洲成年人影院| 日韩美女视频一区| 国产无人区一区二区三区| 欧美群妇大交群中文字幕| 99国产精品国产精品毛片| 老司机一区二区| 亚洲最新在线观看| 中文字幕色av一区二区三区| 精品免费国产二区三区| 欧美精品tushy高清| 色综合视频一区二区三区高清| 激情五月婷婷综合网| 日av在线不卡| 亚洲一区二区三区四区在线| 亚洲人成影院在线观看| 久久精品欧美日韩精品| 日韩美女视频一区二区在线观看| 欧美日韩国产精选| 欧美午夜精品理论片a级按摩| 成人免费高清在线| 黄色资源网久久资源365| 日本不卡一区二区三区高清视频| 夜夜嗨av一区二区三区四季av| 国产精品免费久久久久| 久久精品一区二区三区av| 欧美不卡一区二区| 日韩欧美国产1| 日韩三级免费观看| 日韩精品资源二区在线| 欧美成人精精品一区二区频| 精品日韩欧美一区二区| 精品福利视频一区二区三区| 日韩免费观看高清完整版| 亚洲精品一线二线三线| 久久综合狠狠综合久久综合88 | 欧美日韩精品一区二区三区蜜桃 | 在线不卡a资源高清| 91精品黄色片免费大全| 日韩一卡二卡三卡国产欧美| 欧美www视频| 国产免费成人在线视频| 国产精品嫩草99a| 亚洲已满18点击进入久久| 天天色 色综合| 美女视频网站久久| 国产精品一区二区久久不卡| 国产美女精品一区二区三区| 狠狠色丁香久久婷婷综合_中| 国产原创一区二区三区| 国产电影一区在线| 国产成+人+日韩+欧美+亚洲 | 国产suv精品一区二区883| 国产九九视频一区二区三区| 国产麻豆视频一区二区| 成人av在线资源| 九九视频精品免费| 成人福利电影精品一区二区在线观看| 麻豆精品视频在线| 国产高清成人在线| 国产精品一区二区久激情瑜伽| 成人精品一区二区三区中文字幕| proumb性欧美在线观看| 色悠悠亚洲一区二区| 欧美丝袜丝nylons| 91精选在线观看| www国产成人| 国产精品少妇自拍| 午夜私人影院久久久久| 美国毛片一区二区| 国产成人福利片| 94色蜜桃网一区二区三区| 欧美天天综合网| 欧美电影免费观看高清完整版在线观看 | 国产一区二区三区日韩| 国产91对白在线观看九色| 欧美亚洲综合久久| 欧美mv日韩mv国产网站app| 欧美国产精品一区二区| 亚洲电影一级片| 狠狠狠色丁香婷婷综合久久五月| 成人毛片视频在线观看| 成人丝袜高跟foot| 欧美精品日日鲁夜夜添| 精品国产一二三区| 亚洲一区在线观看免费观看电影高清| 免费成人在线网站| av在线一区二区| 91麻豆精品国产91久久久更新时间 | 91麻豆高清视频| 欧美一区二区日韩| 中文字幕在线不卡国产视频| 视频一区在线播放| 粉嫩一区二区三区在线看| 欧美视频在线不卡| 国产婷婷色一区二区三区四区| 亚洲一区日韩精品中文字幕| 国产一区二区三区精品欧美日韩一区二区三区| 99热这里都是精品| 日韩免费高清电影| 亚洲综合另类小说| 国产99精品国产| 日韩欧美资源站| 一区二区视频在线| 国内精品国产成人| 欧美日韩欧美一区二区| 中文字幕亚洲视频| 麻豆一区二区三| 欧美日韩亚洲另类| 亚洲欧美日韩在线| 免费成人av在线播放| 91在线视频观看| 精品国产乱子伦一区| 一区二区三区日韩| 北条麻妃一区二区三区| 日韩美女一区二区三区四区| 亚洲一区二区中文在线| 99久久精品免费| 欧美激情综合五月色丁香| 精品一区二区三区av| 一本久久a久久免费精品不卡| 国产欧美综合色| 国产在线国偷精品产拍免费yy| 337p亚洲精品色噜噜噜| 亚洲综合免费观看高清完整版在线| 丁香亚洲综合激情啪啪综合| 欧美成人一区二区三区| 免费美女久久99| 欧美美女直播网站| 天天做天天摸天天爽国产一区| 欧美系列亚洲系列| 伊人夜夜躁av伊人久久| 91久久免费观看| 亚洲美女淫视频| 97久久超碰精品国产| 国产精品久久久久影院色老大| 国产麻豆欧美日韩一区| 在线观看91视频| 丝袜亚洲精品中文字幕一区| 欧美性色综合网| 亚洲综合无码一区二区| 欧美亚洲国产bt| 一区二区不卡在线播放| 91传媒视频在线播放| 亚洲欧美一区二区久久| 欧美色视频在线观看| 天天射综合影视| 日韩一卡二卡三卡| 黄色精品一二区| 国产欧美日韩久久| 成人av动漫在线| 亚洲午夜av在线| 91精品国产免费| 久久99国产精品久久99| 久久久久亚洲蜜桃| 成人性生交大片免费| 国产精品看片你懂得| 色综合中文字幕国产| 亚洲精品视频在线观看网站| 51精品秘密在线观看| 麻豆久久久久久久| 国产欧美精品一区二区三区四区 | 亚洲电影在线播放| 日韩区在线观看| 精品在线亚洲视频| 欧美国产一区二区| 色婷婷精品久久二区二区蜜臂av| 国产午夜亚洲精品羞羞网站| 在线亚洲欧美专区二区| 日韩成人精品在线观看| 欧美成人a视频| 成人免费电影视频| 亚洲午夜久久久久久久久电影网| 欧美一区三区四区| 日本欧美加勒比视频| 国产精品色哟哟| 欧美日韩国产片| 国内成人精品2018免费看| 最新高清无码专区| 7777精品伊人久久久大香线蕉| 久久精品99国产精品日本| 中文字幕字幕中文在线中不卡视频| 欧美日韩精品专区| 国产精品1区二区.| 一区二区三区欧美久久| 日韩久久精品一区| 在线观看日韩电影| 韩国一区二区视频|