本文整理了Java中java.awt.Canvas.paint()
方法的一些代码示例,展示了Canvas.paint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.paint()
方法的具体详情如下:
包路径:java.awt.Canvas
类名称:Canvas
方法名:paint
暂无
代码示例来源:origin: org.bytedeco/javacv
public void showColor(Color color) {
this.color = color;
this.image = null;
canvas.paint(null);
}
代码示例来源:origin: org.bytedeco/javacv
public void releaseGraphics(Graphics2D g) {
g.dispose();
canvas.paint(null);
}
代码示例来源:origin: jmagick/jmagick
/**
* Method to draw the image onto the Canvas.
*
* @param g the Graphics object for drawing
*/
public void paint(Graphics g) {
if (image != null) {
g.drawImage(image, 0, 0, this);
}
else {
super.paint(g);
}
}
代码示例来源:origin: org.bytedeco/javacv
public void showImage(Image image) {
if (image == null) {
return;
} else if (isResizable() && needInitialResize) {
int w = (int)Math.round(image.getWidth (null)*initialScale);
int h = (int)Math.round(image.getHeight(null)*initialScale);
setCanvasSize(w, h);
}
this.color = null;
this.image = image;
canvas.paint(null);
}
内容来源于网络,如有侵权,请联系作者删除!