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

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

?? omarrowhead.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// **********************************************************************//// <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/OMArrowHead.java,v $// $RCSfile: OMArrowHead.java,v $// $Revision: 1.4.2.6 $// $Date: 2005/12/08 21:11:20 $// $Author: dietrick $//// **********************************************************************package com.bbn.openmap.omGraphics;import java.awt.BasicStroke;import java.awt.Graphics;import java.awt.Point;import java.awt.Shape;import java.awt.Stroke;import java.awt.geom.GeneralPath;import java.util.Iterator;import java.util.Vector;import com.bbn.openmap.proj.DrawUtil;import com.bbn.openmap.util.Debug;/** * Basic implementation of arrowhead graphics. This class expects intimate * knowledge of an OMLine, and is used to add Arrowhead shapes to the actual * OMLine internal Shape object. You don't have to know about this class, just * call the OMLine methods that create arrowheads and the OMLine will take care * of the rest. */public class OMArrowHead {    public static final int ARROWHEAD_DIRECTION_FORWARD = 0;    public static final int ARROWHEAD_DIRECTION_BACKWARD = 1;    public static final int ARROWHEAD_DIRECTION_BOTH = 2;    // These are base settings.    protected static int DEFAULT_WINGTIP = 5;    protected static int DEFAULT_WINGLENGTH = 20;    protected Shape shape = null;    protected int arrowDirectionType = ARROWHEAD_DIRECTION_FORWARD;    protected int location = 100;    protected int wingTip = 5;    protected int wingLength = 20;    public OMArrowHead(int arrowDirectionType, int location) {        this(arrowDirectionType, location, DEFAULT_WINGTIP, DEFAULT_WINGLENGTH);    }    public OMArrowHead(int arrowDirectionType, int location, int wingtip,            int winglength) {        this.arrowDirectionType = arrowDirectionType;        setLocation(location);        this.wingTip = wingtip;        this.wingLength = winglength;    }    public void generate(OMAbstractLine omal) {        if (wingTip > 0 && wingLength > 0 && omal != null) {            shape = createArrowHeads(arrowDirectionType,                    location,                    omal,                    wingTip,                    wingLength);        } else {            shape = null;        }    }    public void render(Graphics g) {        if (shape != null) {            ((java.awt.Graphics2D) g).fill(shape);        }    }    /**     * Create an arrowhead for the provided line     *      * @param arrowDirectionType ARROWHEAD_DIRECTION_FORWARD for the arrowhead     *        pointing to the last coordinate of the OMLine,     *        ARROWHEAD_DIRECTION_BACKWARD for the arrowhead pointing to the     *        first coordinate in the OMLine, and ARROWHEAD_DIRECTION_BOTH for     *        the arrowhead on both ends.     * @param location A number between 0-100, reflecting the percentage of the     *        line traversed before placing the arrowhead. For     *        ARROWHEAD_DIRECTION_FORWARD and a location of 100, the arrowhead     *        will be placed all the way at the end of the line. For a location     *        of 50, the arrowhead will be placed in the middle of the line.     * @param line OMLine to use to place arrowhead.     * @return the GeneralPath for the arrowhead.     */    public static GeneralPath createArrowHeads(int arrowDirectionType,                                               int location, OMAbstractLine line) {        return createArrowHeads(arrowDirectionType,                location,                line,                DEFAULT_WINGTIP,                DEFAULT_WINGLENGTH);    }    /**     * Create an arrowhead for the provided line     *      * @param arrowDirectionType ARROWHEAD_DIRECTION_FORWARD for the arrowhead     *        pointing to the last coordinate of the OMLine,     *        ARROWHEAD_DIRECTION_BACKWARD for the arrowhead pointing to the     *        first coordinate in the OMLine, and ARROWHEAD_DIRECTION_BOTH for     *        the arrowhead on both ends.     * @param location A number between 0-100, reflecting the percentage of the     *        line traversed before placing the arrowhead. For     *        ARROWHEAD_DIRECTION_FORWARD and a location of 100, the arrowhead     *        will be placed all the way at the end of the line. For a location     *        of 50, the arrowhead will be placed in the middle of the line.     * @param line OMLine to use to place arrowhead.     * @param wingTip Number of pixels to push the side of the arrowhead away     *        from the line.     * @param wingLength Number of pixels reflecting the arrowhead length.     * @return the GeneralPath for the arrowhead.     */    public static GeneralPath createArrowHeads(int arrowDirectionType,                                               int location,                                               OMAbstractLine line,                                               int wingTip, int wingLength) {        Point[] locPoints = locateArrowHeads(arrowDirectionType, location, line);        if (locPoints == null) {            return null;        }        Stroke stroke = line.getStroke();        float lineWidth = 1f;        if (stroke instanceof BasicStroke) {            lineWidth = ((BasicStroke) stroke).getLineWidth();            wingTip += lineWidth;            wingLength += lineWidth * 2;        }        GeneralPath shape = createArrowHead(locPoints[0],                locPoints[1],                wingTip,                wingLength);        int numLocPoints = locPoints.length;        for (int i = 2; i < numLocPoints - 1; i += 2) {            shape.append(createArrowHead(locPoints[i],                    locPoints[i + 1],                    wingTip,                    wingLength), false);        }        return shape;    }    public static void addArrowHeads(int arrowDirectionType, int location,                                     OMAbstractLine line) {        Shape arrowHeads = createArrowHeads(arrowDirectionType, location, line);        if (arrowHeads != null) {            line.getShape().append(arrowHeads, false);        }    }    protected static GeneralPath createArrowHead(Point from, Point to,                                                 int wingTip, int wingLength) {        int dx = to.x - from.x;        int dy = to.y - from.y;        int dd = (int) DrawUtil.distance(to.x, to.y, from.x, from.y);        if (dd < 6)            dd = 6;        int[] xpts = new int[3];        int[] ypts = new int[3];        xpts[0] = (int) (to.x + (dy * (wingTip) - dx * wingLength) / dd);        ypts[0] = (int) (to.y + (dx * (-wingTip) - dy * wingLength) / dd);        xpts[1] = (int) (to.x);        ypts[1] = (int) (to.y);        xpts[2] = (int) (to.x + (dy * (-wingTip) - dx * wingLength) / dd);        ypts[2] = (int) (to.y + (dx * (wingTip) - dy * wingLength) / dd);        return OMGraphic.createShape(xpts, ypts, true);    }    /**     * Create the ArrowHead objects for the lines, based on the settings. This     * function is called while OMLine is being generated. User's don't need to     * call this function. In fact, it assumes that generate() has been called     * (or is being called) on the OMLine. It adds the ArrowHeads to the     * GeneralPath Shape object.     */    protected static Point[] locateArrowHeads(int arrowDirection,                                              int arrowLocation,                                              OMAbstractLine line) {        // NOTE: xpoints[0] refers to the original copy of the        // xpoints, as opposed to the [1] copy, which gets used when the line        // needs to wrap around the screen and show up on the other        // side. Might have to think about the [1] points, and adding        // a arrowhead there if it shows up in the future.        if (line.xpoints == null || line.xpoints.length == 0                || line.xpoints[0].length == 0) {            // line doesn't know where it is...            return null;        }        int pointIndex = line.xpoints[0].length - 1;        if (Debug.debugging("arrowheads")) {            Debug.output("createArrowHeads(): Number of points = " + pointIndex);        }        int drawingLinetype = OMLine.STRAIGHT_LINE; // default        if (pointIndex > 1) {            drawingLinetype = OMLine.CURVED_LINE;        }        // Used as the index for points in the xy point array to use        // as anchors for the arrowheads        int[] end = new int[2];        int[] start = new int[2];        end[0] = pointIndex;        start[0] = 0;        end[1] = 0;        start[1] = pointIndex;        // better names:        int origEnd = pointIndex;        int origStart = 0;        int numArrows = 1; // default        if (arrowDirection == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {            numArrows = 2;        }        // one for the start and end of each arrowhead (there could be        // two)        Point sPoint1 = new Point();        Point ePoint1 = new Point();        Point sPoint2 = new Point();        Point ePoint2 = new Point();        // do we have to reverse the arrows?        if (line instanceof OMLine) {            OMLine omLine = (OMLine) line;            if (omLine.arc != null && omLine.arc.getReversed() == true) {                if (arrowDirection == OMArrowHead.ARROWHEAD_DIRECTION_FORWARD) {                    arrowDirection = OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD;                } else if (arrowDirection == OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD) {                    arrowDirection = OMArrowHead.ARROWHEAD_DIRECTION_FORWARD;                }            }        }        Vector pointVec = new Vector();                // The for loop is needed in case the projection library        // created several projected versions of the line, those used        // for wrapping around to the other side of the map.        for (int lineNum = 0; lineNum < line.xpoints.length; lineNum++) {            int[] xpoints = line.xpoints[lineNum];            int[] ypoints = line.ypoints[lineNum];            switch (drawingLinetype) {            case OMLine.STRAIGHT_LINE:                Debug.message("arrowheads",                        "createArrowHeads(): Inside x-y space");                int newEndX;                int newEndY;                int dx;                int dy;                float dd;                // backwards arrow                if (needBackwardArrow(arrowDirection)) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女在线观看视频一区二区| 国产日本欧美一区二区| 97se亚洲国产综合自在线不卡| 久久国产精品99久久人人澡| 奇米影视在线99精品| 青青草成人在线观看| 久久国产视频网| 久久超级碰视频| 国产真实乱子伦精品视频| 国精产品一区一区三区mba视频| 麻豆极品一区二区三区| 韩国成人在线视频| 国产91对白在线观看九色| 成人激情午夜影院| 91香蕉视频污| 欧美午夜精品久久久久久孕妇| 欧美日韩一区二区电影| 日韩三级电影网址| 久久新电视剧免费观看| 日本一区二区三区国色天香 | 五月激情综合网| 香蕉成人伊视频在线观看| 美国欧美日韩国产在线播放 | 国产日韩亚洲欧美综合| 国产精品丝袜在线| 亚洲精品国产一区二区精华液| 亚洲韩国精品一区| 美女www一区二区| 成人app网站| 91精品中文字幕一区二区三区| 久久一留热品黄| 亚洲日本青草视频在线怡红院 | 国产精品久久三| 亚洲国产精品天堂| 久久不见久久见免费视频7| 成人av综合一区| 正在播放一区二区| 国产精品国产三级国产aⅴ原创 | 亚洲人成在线播放网站岛国| 亚洲成av人片一区二区| 国产成人av影院| 欧美自拍丝袜亚洲| 国产日韩亚洲欧美综合| 亚洲一区二区黄色| 国产aⅴ综合色| 这里只有精品电影| 亚洲视频你懂的| 国内精品不卡在线| 欧美日本在线播放| 亚洲欧洲精品天堂一级| 九九九久久久精品| 欧美日韩高清一区| 亚洲欧美综合色| 国产精品亚洲专一区二区三区| 在线视频国内自拍亚洲视频| 国产欧美一区二区三区网站| 肉色丝袜一区二区| 91免费版在线| 国产精品午夜在线| 久久99精品久久久久久久久久久久| 色屁屁一区二区| 中文字幕一区二区三区在线播放| 黄色小说综合网站| 91精品国产综合久久久蜜臀图片| 一区二区免费看| av不卡在线观看| 中文欧美字幕免费| 国产精品亚洲人在线观看| 日韩精品一区国产麻豆| 日本91福利区| 欧美一区二区成人| 人人爽香蕉精品| 欧美一区二区三区视频| 午夜视频在线观看一区二区三区| 91黄色激情网站| 亚洲最大成人网4388xx| 色狠狠av一区二区三区| 亚洲精品一二三四区| 日本电影欧美片| 亚洲自拍偷拍av| 欧美日韩一区二区三区四区五区| 亚洲精品高清在线观看| 欧美亚洲自拍偷拍| 午夜激情一区二区| 日韩一区二区在线播放| 久久精品国产亚洲高清剧情介绍| 日韩视频在线观看一区二区| 国产一区二区在线免费观看| 久久理论电影网| 成人永久aaa| 亚洲精品国产精品乱码不99| 欧洲精品在线观看| 日本欧美在线看| 久久久久久久精| 99精品偷自拍| 天天av天天翘天天综合网| 欧美sm美女调教| 不卡av电影在线播放| 亚洲综合色成人| 日韩视频免费观看高清完整版在线观看 | 国产一区二区在线免费观看| 国产精品久久久久久久久快鸭| 91免费国产在线| 麻豆久久一区二区| 日本一区二区三区在线观看| 色噜噜偷拍精品综合在线| 秋霞午夜av一区二区三区| 国产日韩欧美精品一区| 日本久久电影网| 精品在线免费视频| 亚洲天堂免费在线观看视频| 91精品国产综合久久香蕉麻豆| 国产91精品入口| 亚洲第四色夜色| 国产精品你懂的在线| 欧美久久一二三四区| 成人综合婷婷国产精品久久| 午夜国产不卡在线观看视频| 国产欧美一区二区精品性色 | 日韩久久久久久| 91浏览器打开| 国产美女在线观看一区| 亚洲图片欧美一区| 国产精品免费久久| 日韩免费观看高清完整版| 在线一区二区三区| 国产成人精品网址| 六月婷婷色综合| 亚洲一区二区三区四区在线免费观看| 精品久久一区二区| 欧美手机在线视频| 91麻豆自制传媒国产之光| 国产激情一区二区三区四区| 日韩精品乱码av一区二区| 亚洲精品免费在线播放| 国产精品私人影院| 国产欧美中文在线| 久久综合色8888| 日韩无一区二区| 欧美日韩一区不卡| 91原创在线视频| heyzo一本久久综合| 国产精品18久久久久久久久久久久| 三级欧美韩日大片在线看| 亚洲aⅴ怡春院| 一区二区久久久久久| 亚洲香肠在线观看| 亚洲综合丁香婷婷六月香| 日韩理论片在线| 综合激情成人伊人| 国产精品色哟哟网站| 国产日韩精品久久久| 国产午夜精品久久| 日本一区二区三区电影| 久久久久久综合| 国产欧美在线观看一区| 国产精品国产自产拍高清av王其 | 99re8在线精品视频免费播放| 国产福利一区二区三区在线视频| 国产一区福利在线| 国产成人丝袜美腿| 成人av网址在线| 91在线免费看| 日本精品一区二区三区四区的功能| www.66久久| 欧美三级在线播放| 在线不卡免费欧美| 欧美一区二区美女| 欧美精品一区二区三区蜜桃视频| 久久久亚洲午夜电影| 国产欧美日韩麻豆91| 亚洲人吸女人奶水| 日韩经典中文字幕一区| 极品少妇xxxx精品少妇| av一区二区三区四区| 91福利社在线观看| 制服丝袜亚洲色图| 国产午夜精品久久久久久免费视| 亚洲色图一区二区| 亚洲一二三专区| 麻豆视频观看网址久久| 福利电影一区二区| 欧美在线观看一二区| 日韩一区和二区| 国产精品久久久久久久裸模| 一二三四社区欧美黄| 麻豆成人免费电影| 91在线视频播放地址| 日韩欧美一级精品久久| 亚洲摸摸操操av| 久久丁香综合五月国产三级网站| 91啦中文在线观看| ww亚洲ww在线观看国产| 亚洲精品日日夜夜| 国产在线播放一区三区四| 一本到不卡免费一区二区| 精品国产污网站| 亚洲亚洲人成综合网络| zzijzzij亚洲日本少妇熟睡| 日韩欧美亚洲一区二区|