gpt4 book ai didi

org.weasis.core.ui.editor.image.ZoomWin.getBounds()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 06:00:31 27 4
gpt4 key购买 nike

本文整理了Java中org.weasis.core.ui.editor.image.ZoomWin.getBounds()方法的一些代码示例,展示了ZoomWin.getBounds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoomWin.getBounds()方法的具体详情如下:
包路径:org.weasis.core.ui.editor.image.ZoomWin
类名称:ZoomWin
方法名:getBounds

ZoomWin.getBounds介绍

暂无

代码示例

代码示例来源:origin: nroduit/Weasis

protected void draw(Graphics2D g2d) {
  Stroke oldStroke = g2d.getStroke();
  Paint oldColor = g2d.getPaint();
  Shape oldClip = g2d.getClip();
  g2d.clip(shape);
  g2d.setBackground(backgroundColor);
  drawBackground(g2d);
  // Set font size according to the view size
  g2d.setFont(MeasureTool.viewSetting.getFont());
  // Paint the visible area
  Point2D p = getClipViewCoordinatesOffset();
  g2d.translate(p.getX(), p.getY());
  imageLayer.drawImage(g2d);
  drawLayers(g2d, affineTransform, inverseTransform);
  g2d.translate(-p.getX(), -p.getY());
  g2d.setClip(oldClip);
  g2d.setStroke(stroke);
  g2d.setPaint(lineColor);
  Rectangle bound = getBounds();
  g2d.drawRect(bound.width - 12 - borderOffset, bound.height - 12 - borderOffset, 12, 12);
  g2d.draw(shape);
  g2d.setPaint(oldColor);
  g2d.setStroke(oldStroke);
}

代码示例来源:origin: nroduit/Weasis

private void refreshZoomWin() {
  Point loc = getLocation();
  if (loc.x == -1 && loc.y == -1) {
    centerZoomWin();
    return;
  }
  Rectangle rect = view2d.getBounds();
  rect.x = 0;
  rect.y = 0;
  Rectangle2D r = rect.createIntersection(getBounds());
  if (r.getWidth() < 25.0 || r.getHeight() < 25.0) {
    centerZoomWin();
  }
}

代码示例来源:origin: nroduit/Weasis

int h = getHeight();
if (w != 0 && h != 0) {
  Rectangle bound = lens.getBounds();
  if (oldSize.width != 0 && oldSize.height != 0) {
    int centerx = bound.width / 2;

代码示例来源:origin: nroduit/Weasis

int h = getHeight();
if (w != 0 && h != 0) {
  Rectangle bound = lens.getBounds();
  if (oldSize.width != 0 && oldSize.height != 0) {
    int centerx = bound.width / 2;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com