Java中使用Graphics 画图的一个问题
来源:互联网 发布:python 数据挖掘包 编辑:程序博客网 时间:2024/06/11 21:14
使用BufferedImage 生成的图像总是黑色背景,即使是使用了Graphics2D的setBackground()也没有效用,实际上要得到其它颜色的背景“应该”是使用fillRect()将整个矩形变色。
Graphics g = bufferedImage.createGraphics();
g.setColor( Color.white );
g.fillRect(0, 0, width, height );
然后再是画你所需要的东西。
这样大概OK了。
Graphics g = bufferedImage.createGraphics();
g.setColor( Color.white );
g.fillRect(0, 0, width, height );
然后再是画你所需要的东西。
这样大概OK了。
- Java中使用Graphics 画图的一个问题
- 使用Graphics中的drawRect画图遇到的问题
- C#中Graphics的画图代码【转】
- C#中Graphics的画图代码【转】
- GDI+画图类Graphics的使用
- C# 使用Graphics画图
- java graphics 画图
- java 画图 graphics
- C#中使用Graphics画图的Matrix变换错误分析(持续更新中)
- java图形界面基础之画图(使用Graphics类从画图形到图片到gif)
- 采用swing的Graphics画图
- 在CScrollView中使用双缓存画图的拖动问题
- graphics画图
- 使用GDI画图时未识别graphics
- Java用BufferedImage和Graphics画图
- 使用java的画图类
- android graphics画图的点击事件处理
- Android graphics画图的点击事件处理
- .net framework 使用非托管DLL函数
- 发现了一个新的东东---Minidx
- 2008年2月26日 linux基本命令
- 对理想的一点想法
- ANSI Char* 和 Unicode Char* 互换
- Java中使用Graphics 画图的一个问题
- 不怕做不到,只怕想不到
- Libjingle应用之三——设置会话管理
- Java 剪切文本内容
- hibernate-->HQL
- 读《Ajax基础教程》(3)
- 一切皆艺术
- 使用Struts的Token机制解决表单的重复提交
- 在VS.NET 2005中体验clickonce技术