java
文章平均质量分 71
fxl02
这个作者很懒,什么都没留下…
展开
-
java 2d 的虚线实现
可以通过Stroke 接口的实现类BasicStroke来实现笔画的设置 1 BasicStroke() Constructs a new BasicStroke with defaults for all attributes 2 BasicStroke(float width) Constructs a solid BasicStroke with the spec原创 2005-09-05 01:32:00 · 1371 阅读 · 0 评论 -
Servlet 动态显示图片
在Java中,java.awt和java.awt.image包提供了基本的绘制图像的能力,我们可以在内存中绘制好需要的图形,然后编码成jpeg或其他图像格式,最后发送相应给浏览器即可。下面是使用Servlet动态创建图像的详细步骤:1.创建BufferedImage对象,该对象存在内存中,负责保存绘制的图像;2.创建Graphics2D对象,该对象负责绘制所需的图像;3.当绘制完成后,调用com.原创 2005-09-08 22:11:00 · 1152 阅读 · 0 评论