没有合适的资源?快使用搜索试试~ 我知道了~
Java Methods-Graphics.ppt
资源推荐
资源详情
资源评论
Graphics
Java Methods
Java Methods
Object-Oriented Programming
and Data Structures
16-2
Objectives:
• Understand computer graphics basics
• Learn about paint, paintComponent, and
repaint methods
• Learn about coordinates and colors
• Review shape drawing methods
• Learn to use fonts and draw graphics text
16-3
Computer Graphics Basics
• There are two types of graphics
devices: vector and raster.
• A vector device has some kind of
pen that can move and draw
lines directly on the surface.
• A raster device creates a picture
by setting colors to individual
pixels (picture elements) on a
rectangular “raster.”
16-4
Basics (cont’d)
• A graphics adapter in your computer is a
raster device.
• VRAM (video RAM) contains the information
about the colors of all pixels.
• The screen displays the contents of VRAM.
• To draw a shape, you need to set the exactly
right set of pixels to the required colors.
• The number of pixels in the raster vertically
and horizontally is called the device
resolution.
16-5
Basics (cont’d)
• A graphics software package provides
functions for:
setting drawing attributes: color, line width and
style, fill texture and pattern, font
drawing lines, circles, rectangles, polygons, and
other basic shapes.
• In other words, a graphics package turns a
raster device into a “logical” vector device.
剩余20页未读,继续阅读
资源评论
珞瑜·
- 粉丝: 10w+
- 资源: 500
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功