ij.gui.GUI.createBlankImage()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(114)

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

GUI.createBlankImage介绍

[英]Creates a white AWT Image image of the specified size.
[中]创建指定大小的白色AWT图像。

代码示例

代码示例来源:origin: imagej/ImageJA

int getFontHeight() {
  Image img = GUI.createBlankImage(64, 64); //dummy version to get fontHeight
  Graphics g = img.getGraphics();
  int fontType = boldText?Font.BOLD:Font.PLAIN;
  Font font = new Font("SansSerif", fontType, (int) (fontSize*zoom) );
  FontMetrics metrics = g.getFontMetrics(font);
  return	metrics.getHeight();
}

代码示例来源:origin: net.imagej/ij

int getFontHeight() {
  Image img = GUI.createBlankImage(64, 64); //dummy version to get fontHeight
  Graphics g = img.getGraphics();
  int fontType = boldText?Font.BOLD:Font.PLAIN;
  Font font = new Font("SansSerif", fontType, (int) (fontSize*zoom) );
  FontMetrics metrics = g.getFontMetrics(font);
  return	metrics.getHeight();
}

代码示例来源:origin: sc.fiji/Image_5D

public ChannelColorCanvas(final ChannelColorChooser cColorChooser) {
      super();

      this.cColorChooser = cColorChooser;

      setForeground(Color.black);
      setBackground(Color.white);

      cpWidth = cpRectWidth * cpNSats;
      cpHeight = cpRectHeight * cpNHues;

      canvasWidth = lutWidth + 2 + hSpacer + cpWidth + 2;
      canvasHeight = cpHeight + 2 + vSpacer + commonsHeight;

      setSize(canvasWidth, canvasHeight);

//            lutImage = new BufferedImage(lutWidth+2, lutHeight+2, BufferedImage.TYPE_INT_RGB);
//            colorPickerImage = new BufferedImage(cpWidth+2, cpHeight+2, BufferedImage.TYPE_INT_RGB);
      lutImage = GUI.createBlankImage(lutWidth + 2, lutHeight + 2);
      colorPickerImage = GUI.createBlankImage(cpWidth + 2, cpHeight + 2);
//            commonsImage = new BufferedImage(commonsWidth, commonsHeight, BufferedImage.TYPE_INT_RGB);

      drawLUT();
      drawColorPicker();
//            drawCommons();

      addMouseListener(this);

    }

代码示例来源:origin: sc.fiji/FlowJ_

private void doGraph()
{
   if (flow instanceof FlowJFlow && trueFlow instanceof FlowJFlow)
   {
      ImagePlus imp = new ImagePlus("True-Estimate "+description,
      GUI.createBlankImage(300,300));
      ImageWindow imw = new ImageWindow(imp);
      imp.show();
      Image img = imp.getImage();
      FlowJError.map(img.getGraphics(), 300, 300, flow, trueFlow);
   }
   else
      IJ.error("flow or true flow not known");
}
/**

代码示例来源:origin: net.imagej/ij

Image img = GUI.createBlankImage(128, 64);
Graphics g = img.getGraphics();
FontMetrics metrics = g.getFontMetrics(font);

代码示例来源:origin: imagej/ImageJA

Image img = GUI.createBlankImage(128, 64);
Graphics g = img.getGraphics();
FontMetrics metrics = g.getFontMetrics(font);

相关文章

微信公众号

最新文章

更多