Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

70
LINES

< > BotCompany Repo | #1006778 // showZoomedImage_centered - show an image zoomed (default zoom is 2)

JavaX fragment (include)

static ImageSurface showZoomedImage_centered(final RGBImage image) {
  ret showZoomedImage_centered(image, 2);
}

static ImageSurface showZoomedImage_centered(S title, RGBImage image) {
  ret showZoomedImage_centered(title, image, 2);
}

static ImageSurface showZoomedImage_centered(S title, RGBImage image, double zoom) {
  ret setFrameTitle(showZoomedImage_centered(image, zoom), title);
}

static ImageSurface showZoomedImage_centered(final RGBImage image, final double zoom) {
  ret showZoomedImage_centered(image.getBufferedImage(), zoom);
}

static ImageSurface showZoomedImage_centered(final BufferedImage image, final double zoom) {
  ret (ImageSurface) swingAndWait(func {
    ImageSurface is = showImage_centered(image);
    is.setZoom(zoom);
    packFrame(is);
    ret is;
  });
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, final RGBImage image, final double zoom) {
  ret showZoomedImage_centered(image, surface, zoom);
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, final BufferedImage image, final double zoom) {
  ret showZoomedImage_centered(image, surface, zoom);
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, final RGBImage image, S title, final double zoom) {
  ret showZoomedImage_centered(surface, title, image, zoom);
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, S title, final RGBImage image, final double zoom) {
  ret setFrameTitle(showZoomedImage_centered(image, surface, zoom), title);
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, final RGBImage image, S title) {
  ret showZoomedImage_centered(surface, title, image);
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, S title, final RGBImage image) {
  ret showZoomedImage_centered(surface, title, image, 2.0);
}

static ImageSurface showZoomedImage_centered(RGBImage image, ImageSurface surface, double zoom) {
  if (surface == null)
    ret showZoomedImage_centered(image, zoom);
  else {
    surface.setImage(image);
    ret surface;
  }
}

static ImageSurface showZoomedImage_centered(ImageSurface surface, S title, BufferedImage image, double zoom) {
  ret setFrameTitle(title, showZoomedImage_centered(surface, image, zoom));
}

static ImageSurface showZoomedImage_centered(BufferedImage image, ImageSurface surface, double zoom) {
  if (surface == null)
    ret showZoomedImage_centered(image, zoom);
  else {
    surface.setImage(image);
    ret surface;
  }
}

Author comment

Began life as a copy of #1005704

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006778
Snippet name: showZoomedImage_centered - show an image zoomed (default zoom is 2)
Eternal ID of this version: #1006778/16
Text MD5: 2022163f28f58f0f017e70d27f3f5da3
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-06 16:40:47
Source code size: 2557 bytes / 70 lines
Pitched / IR pitched: No / No
Views / Downloads: 529 / 553
Version history: 15 change(s)
Referenced in: [show references]