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

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

?? unlinkfishcanvas.java

?? 深入java 虛擬機中的一個Java程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        // Try left vertical line. What is the line's y value for the xRectLeft?
        // y = m(xRectLeft) + b
        float value = ((m * (float) xRectLeft) + b);

        if (value >= (float) yRectTop && value <= (float) yRectBottom) {
            return true;
        }

        // Try right vertical line. What is the line's y value for the xRectRight?
        // y = m(xRectRight) + b
        value = ((m * (float) xRectRight) + b);

        if (value >= (float) yRectTop && value <= (float) yRectBottom) {
            return true;
        }

        // Try top horizontal line. What is the line's x value for the yRectTop?
        // x = (yRecTop - b) / m
        value = (((float) yRectTop - b) / m);

        if (value >= (float) xRectLeft && value <= (float) xRectRight) {
            return true;
        }

        return false;
/*
        int xRectLeft = (x - mouseFatness) * extraZeros;
        int xRectRight = (x + mouseFatness) * extraZeros;
        int yRectTop = (y - mouseFatness) * extraZeros;
        int yRectBottom = (y + mouseFatness) * extraZeros;

        // Calculate slope of line times some factor (extraZeros). If extraZeros is 1000,
        // then the variable m will be 1000 times the slope of the line.
        int m = ((lineEnd.y - lineStart.y) * extraZeros) / (lineEnd.x - lineStart.x);

        // Calculate y intercept of line times some factor (extraZeros). If extraZeros
        // is 1000, then the variable b will be 1000 times the y intercept of the line.
        int b = (lineStart.y * extraZeros) - (m * lineStart.x);

        // Try left vertical line. What is the line's y value for the xRectLeft?
        // y = m(xRectLeft) + b
        int value = (m * (xRectLeft / extraZeros)) + b;

        if (value >=  yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try right vertical line. What is the line's y value for the xRectRight?
        // y = m(xRectRight) + b
        value = (m * (xRectRight / extraZeros)) + b;

        if (value >= yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try top horizontal line. What is the line's x value for the yRectTop?
        // x = (yRecTop - b) / m
        value = ((yRectTop - b) * extraZeros) / m;

        if (value >= xRectLeft && value <= xRectRight) {
            return true;
        }

        // Try bottom horizontal line. What is the line's x value for the yRectTop?
        // x = (yRecTop - b) / m
        value = ((yRectBottom - b) * extraZeros) / m;

        if (value >= xRectLeft && value <= xRectRight) {
            return true;
        }

        return false;
*/
    }

/*
    private boolean mouseOverLine(int x, int y, Point lineStart, Point lineEnd) {
        // Determine if the line defined by lineStart and lineEnd crosses a square
        // that is 2 * mouseFatness in width and height centered on the x, y mouse
        // position. Do this by looking to see if the line crosses any of 3 sides of
        // the rectangle. If not, the line does not intersect the rectangle.

        float xRectLeft = (float) (x - mouseFatness);
        float xRectRight = (float) (x + mouseFatness);
        float yRectTop = (float) (y - mouseFatness);
        float yRectBottom = (float) (y + mouseFatness);

        float xlineStart = (float) lineStart.x;
        float ylineStart = (float) lineStart.y;
        float xlineEnd = (float) lineEnd.x;
        float ylineEnd = (float) lineEnd.y;

        // Calculate slope of line
        float m = (ylineEnd - ylineStart) / (xlineEnd - xlineStart);

        // Calculate y intercept of line
        float b = ylineStart - (m * xlineStart);

        // Try left vertical line. What is the line's y value for the xRectLeft?
        // y = m(xRectLeft) + b
        float value = (m * xRectLeft) + b;

        if (value >=  yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try right vertical line. What is the line's y value for the xRectRight?
        // y = m(xRectRight) + b
        value = (m * xRectRight) + b;

        if (value >= yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try top horizontal line. What is the line's x value for the yRectTop?
        // x = (yRecTop - b) / m
        value = (m * xRectRight) + b;

        if (value >= xRectLeft && value <= xRectRight) {
            return true;
        }

        return true;
    }

    private boolean mouseOverLine(int x, int y, Point lineStart, Point lineEnd) {
        // Determine if the line defined by lineStart and lineEnd crosses a square
        // that is 2 * mouseFatness in width and height centered on the x, y mouse
        // position. Do this by looking to see if the line crosses any of 3 sides of
        // the rectangle. If not, the line does not intersect the rectangle.

        int xRectLeft = (x - mouseFatness) * extraZeros;
        int xRectRight = (x + mouseFatness) * extraZeros;
        int yRectTop = (y - mouseFatness) * extraZeros;
        int yRectBottom = (y + mouseFatness) * extraZeros;

        int xlineStart = lineStart.x * extraZeros;
        int ylineStart = lineStart.y * extraZeros;
        int xlineEnd = lineEnd.x * extraZeros;
        int ylineEnd = lineEnd.y * extraZeros;

        // Calculate slope of line
        int m = ylineEnd - ylineStart;
        m /= xlineEnd - xlineStart;

        // Calculate y intercept of line
        int b = ylineStart - (m * xlineStart);

        // Try left vertical line. What is the line's y value for the xRectLeft?
        // y = m(xRectLeft) + b
        int value = (m * xRectLeft) + b;

        if (value >=  yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try right vertical line. What is the line's y value for the xRectRight?
        // y = m(xRectRight) + b
        value = (m * xRectRight) + b;

        if (value >= yRectTop && value <= yRectBottom) {
            return true;
        }

        // Try top horizontal line. What is the line's x value for the yRectTop?
        // x = (yRecTop - b) / m
        value = (m * xRectRight) + b;

        if (value >= xRectLeft && value <= xRectRight) {
            return true;
        }

        return false;
    }
*/
/*
    public boolean mouseDown(Event evt, int x, int y) {

        // First check to see if the mouse went down inside one of the local variable
        // rectangles.
        if (x >= xLocalVarRectStart && x < xLocalVarRectStart + localVarRectWidth
            && y >= yYellowFishLocalVarStart && y < yYellowFishLocalVarStart + localVarRectHeight) {

            yellowLocalVarClicked = true;
            return true;
        }
        if (x >= xLocalVarRectStart && x < xLocalVarRectStart + localVarRectWidth
            && y >= yBlueFishLocalVarStart && y < yBlueFishLocalVarStart + localVarRectHeight) {

            blueLocalVarClicked = true;
            return true;
        }
        if (x >= xLocalVarRectStart && x < xLocalVarRectStart + localVarRectWidth
            && y >= yRedFishLocalVarStart && y < yRedFishLocalVarStart + localVarRectHeight) {

            redLocalVarClicked = true;
            return true;
        }

        // Find out if the mouse went down inside an icon's hot area. Count down from the
        // top of the heap list so that fish that are drawn later will be found first. This
        // is because if two fish are overlapping, the one later in the array will be
        // drawn second and appear to be on top. The top fish will be found first by this
        // for loop.
        for (int i = gcHeap.getHandlePoolSize() - 1; i >= 0; --i) {
            ObjectHandle oh = gcHeap.getObjectHandle(i + 1);
            if (!oh.free) {
                Point o = oh.fish.getFishPosition();
                if (x >= o.x && x < o.x + oh.fish.getFishWidth() && y >= o.y
                    && y < o.y + oh.fish.getFishHeight()) {

                    iconClicked = true;
                    objectIndexOfFishIconThatWasClicked = i + 1;
                    posOfMouseInsideIconWhenFirstPressed.x = x - o.x;
                    posOfMouseInsideIconWhenFirstPressed.y = y - o.y;
                    break;
                }
            }
        }

        return true;
    }

    public boolean mouseUp(Event evt, int x, int y) {

        if (!iconClicked && !yellowLocalVarClicked && !blueLocalVarClicked
            && !redLocalVarClicked) {
            return true;
        }

        if (!iconClicked) {

            Color colorOfClickedLocalVar = Color.yellow;
            if (blueLocalVarClicked) {
                colorOfClickedLocalVar = Color.cyan;
            }
            else if (redLocalVarClicked) {
                colorOfClickedLocalVar = Color.red;
            }

            if (dragging) {
                dragging = false;
                // Clear old line.
                Graphics g = getGraphics();
                g.setColor(Color.blue);
                g.setXORMode(colorOfClickedLocalVar);

                int xLineStart = xLocalVarRectStart + localVarRectWidth;
                int yLineStart = yYellowFishLocalVarStart + (localVarRectHeight / 2);
                if (blueLocalVarClicked) {
                    yLineStart = yBlueFishLocalVarStart + (localVarRectHeight / 2);
                }
                else if (redLocalVarClicked) {
                    yLineStart = yRedFishLocalVarStart + (localVarRectHeight / 2);
                }

                if (!mouseIsOverAnIconThatCanBeDroppedUpon) {

                    // Clear old line
                    g.drawLine(xLineStart, yLineStart, currentMouseDragPosition.x,
                        currentMouseDragPosition.y);
                }
                else {
                    ObjectHandle oh = gcHeap.getObjectHandle(objectIndexOfIconThatCanBeDroppedUpon);

                    // Clear the rectangle
                    g.drawRect(oh.fish.getFishPosition().x, oh.fish.getFishPosition().y, oh.fish.getFishWidth(),
                        oh.fish.getFishHeight());

                    // Clear the line between the nose of the from fish and the top of the tail of
                    // of the to fish.
                    g.drawLine(xLineStart, yLineStart, oh.fish.getFishPosition().x,
                        oh.fish.getFishPosition().y);

                    mouseIsOverAnIconThatCanBeDroppedUpon = false;
                }
            }


            // Check to see if the line was dropped on a fish icon. If so,
            // connect the two fish by writing to the instance variable of the
            // class and repainting.
            for (int i = gcHeap.getHandlePoolSize() - 1; i >= 0; --i) {
                ObjectHandle oh = gcHeap.getObjectHandle(i + 1);
                if (!oh.free) {

                    Point o = oh.fish.getFishPosition();
                    if (x >= o.x && x < o.x + oh.fish.getFishWidth() && y >= o.y
                        && y < o.y + oh.fish.getFishHeight()) {

                        if (oh.fish.getFishColor() == colorOfClickedLocalVar) {

                            // Set the local variable to equal the dropped upon
                            // fish object.
                            if (yellowLocalVarClicked) {
                                localVars.yellowFish = i + 1;
                            }
                            else if (blueLocalVarClicked) {
                                localVars.blueFish = i + 1;
                            }
                            else if (redLocalVarClicked) {
                                localVars.redFish = i + 1;
                            }
                            repaint();
                        }
                        break;
                    }
                }
            }

            yellowLocalVarClicked = false;
            blueLocalVarClicked = false;
            redLocalVarClicked = false;

            return true;
        }

        ObjectHandle fishObjectThatWasClicked = gcHeap.getObjectHandle(objectIndexOfFishIconThatWasClicked);
        FishIcon fishIconThatWasClicked = fishObjectThatWasClicked.fish;
        Color colorOfClickedFish = fishObjectThatWasClicked.fish.getFishColor();

        if (dragging) {
            dragging = false;
            // Clear old line.
            Graphics g = getGraphics();
            g.setColor(Color.blue);
            g.setXORMode(colorOfClickedFish);

            Point lineStart = fishIconThatWasClicked.getFishNosePosition();

            if (!mouseIsOverAnIconThatCanBeDroppedUpon) {

                // Clear old line
                g.drawLine(lineStart.x, lineStart.y, currentMouseDragPosition.x,
                    currentMouseDragPosition.y);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
yourporn久久国产精品| 久久久亚洲高清| 日韩免费性生活视频播放| 国产人成亚洲第一网站在线播放| 亚洲激情欧美激情| 国产福利精品一区二区| 4438亚洲最大| 亚洲精品乱码久久久久久 | 中文字幕中文字幕一区二区| 天天色天天操综合| 91色婷婷久久久久合中文| 欧美精品一区二区精品网| 亚洲国产成人高清精品| 日本韩国一区二区三区视频| 国产蜜臀av在线一区二区三区| 免费三级欧美电影| 欧美日韩在线综合| 亚洲乱码国产乱码精品精可以看| 国产91丝袜在线18| 欧美国产日韩精品免费观看| 极品尤物av久久免费看| 日韩精品中午字幕| 日韩精品1区2区3区| 欧美日本韩国一区| 五月激情丁香一区二区三区| 在线视频观看一区| 亚洲精品国产精华液| 成人动漫一区二区| 国产精品毛片久久久久久久 | 日韩高清在线观看| 欧美性生活久久| 亚洲一区二区在线免费看| 91在线免费看| 综合久久综合久久| 色偷偷久久一区二区三区| 亚洲裸体在线观看| 色综合久久久久久久久久久| 一区二区三区在线观看欧美| 欧美在线啊v一区| 伊人夜夜躁av伊人久久| 欧美视频日韩视频| 免费在线观看一区二区三区| 欧美一区二区精品在线| 狠狠久久亚洲欧美| 日本一区二区免费在线| av日韩在线网站| 一区二区在线观看不卡| 欧美色网站导航| 美女视频网站黄色亚洲| 久久亚洲综合av| 国产99久久久久| 亚洲午夜成aⅴ人片| 欧美肥妇bbw| 国产精品 欧美精品| 国产精品久久二区二区| 欧美日韩国产综合一区二区| 久久精品久久精品| 成人欧美一区二区三区| 欧美日韩mp4| 国产激情视频一区二区在线观看 | www.亚洲色图| 亚洲成人av福利| 久久夜色精品国产噜噜av | 亚洲第一主播视频| 日韩欧美中文字幕一区| av中文字幕亚洲| 日韩国产欧美一区二区三区| 国产夜色精品一区二区av| 色嗨嗨av一区二区三区| 久久国产麻豆精品| 亚洲特黄一级片| 欧美精品一区二区三区蜜桃| 色哟哟欧美精品| 国内精品伊人久久久久av一坑| 亚洲女与黑人做爰| 久久久影视传媒| 51精品国自产在线| 91麻豆swag| 国产精品一区免费在线观看| 亚洲制服丝袜av| 欧美激情一区二区| 337p亚洲精品色噜噜| 97精品超碰一区二区三区| 久久国产剧场电影| 亚洲美女视频在线| 日本一区二区三级电影在线观看| 91精品国模一区二区三区| 91丨porny丨户外露出| 国产在线一区观看| 石原莉奈在线亚洲三区| 亚洲免费电影在线| 亚洲国产成人自拍| wwww国产精品欧美| 日韩西西人体444www| 欧美午夜免费电影| 91丝袜高跟美女视频| 粉嫩高潮美女一区二区三区| 国产自产2019最新不卡| 蜜桃av噜噜一区二区三区小说| 一卡二卡三卡日韩欧美| 最新久久zyz资源站| 国产欧美日韩一区二区三区在线观看 | 国产东北露脸精品视频| 麻豆精品在线视频| 亚洲第一在线综合网站| 亚洲国产日韩精品| 伊人一区二区三区| 一区二区三区不卡在线观看| 亚洲天堂免费在线观看视频| 国产精品久久久久久妇女6080| 国产欧美日韩中文久久| 欧美国产视频在线| 日本一区二区三区dvd视频在线| 久久久久久免费网| 国产欧美一区二区精品性色超碰| 国产亚洲视频系列| 国产精品午夜在线| 亚洲欧美国产高清| 亚洲成人动漫在线免费观看| 一区二区视频在线| 亚洲福利电影网| 日本在线不卡一区| 狂野欧美性猛交blacked| 国内不卡的二区三区中文字幕| 国产麻豆精品久久一二三| 国产成人免费高清| 91亚洲国产成人精品一区二区三| 色综合天天综合网天天狠天天| 99久久精品国产麻豆演员表| 91麻豆精东视频| 欧美日韩一级黄| 日韩欧美黄色影院| 久久先锋影音av鲁色资源| 国产精品久久一卡二卡| 亚洲一区二区在线观看视频| 日韩制服丝袜先锋影音| 国产一区二区成人久久免费影院 | 久久99国产精品尤物| 国产99一区视频免费| 欧美亚洲愉拍一区二区| 日韩免费视频一区| 国产精品久久三区| 丝袜诱惑制服诱惑色一区在线观看| 久久国产尿小便嘘嘘尿| 成人av在线网| 在线播放一区二区三区| 国产婷婷色一区二区三区在线| 亚洲免费观看高清完整版在线观看 | 7777精品伊人久久久大香线蕉| 日韩精品一区二区三区中文不卡 | 国产99久久久国产精品潘金| 一本一道久久a久久精品综合蜜臀| 欧美日韩一区在线观看| 久久日韩粉嫩一区二区三区| 一区二区三区波多野结衣在线观看 | 成人综合婷婷国产精品久久蜜臀| av欧美精品.com| 精品国内二区三区| 亚洲人成精品久久久久| 久久99精品久久久久久久久久久久| 成人网男人的天堂| 91精品国产手机| 亚洲综合色噜噜狠狠| 国产精品18久久久久久久久久久久 | thepron国产精品| 日韩亚洲欧美中文三级| 中文字幕免费观看一区| 亚洲一区在线观看网站| 粉嫩欧美一区二区三区高清影视| 欧美精品日韩精品| 亚洲欧美日韩国产手机在线| 久久99精品久久久| 欧美日韩精品专区| 国产精品久久精品日日| 国内精品免费在线观看| 91精品国产91久久综合桃花| 亚洲欧美日韩在线播放| 国产成人午夜电影网| 精品久久人人做人人爽| 午夜影院久久久| 欧美色成人综合| 亚洲黄一区二区三区| 91麻豆蜜桃一区二区三区| 国产欧美一区视频| 国产高清一区日本| 久久综合色一综合色88| 久久99精品国产91久久来源| 91成人看片片| 亚洲黄色录像片| 91黄色激情网站| 亚洲免费大片在线观看| 91婷婷韩国欧美一区二区| 成人欧美一区二区三区小说| 成人av综合在线| 国产精品久久三| 91网上在线视频| 亚洲精品福利视频网站| 在线免费亚洲电影| 亚洲一区二区av在线| 欧美另类videos死尸|