ImageAnalyzer.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:code 作者:
void scrollHorizontally(ScrollBar scrollBar) {
    if (image == null) {
        return;
    }
    Rectangle canvasBounds = imageCanvas.getClientArea();
    int width = Math.round(imageData.width * xscale);
    int height = Math.round(imageData.height * yscale);
    if (width > canvasBounds.width) {
        // Only scroll if the image is bigger than the canvas.
        int x = -scrollBar.getSelection();
        if (x + width < canvasBounds.width) {
            // Don't scroll past the end of the image.
            x = canvasBounds.width - width;
        }
        imageCanvas.scroll(x, iy, ix, iy, width, height, false);
        ix = x;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号