Download presentation
Presentation is loading. Please wait.
Published byArthur Burke Modified over 9 years ago
1
Paint Application in Java Clark Jayson Cacal Aveline Germar Jose Sison Christopher Valera
2
Image Processing The image is colored per pixel. Each pixel has a RGB Value o 1 Byte Red Value o 1 Byte Green Value o 1 Byte Blue Value o Others have ARGB w/ 1 Byte Alpha Value (Transparency) (0,0) (14,0) (0,18) (14,18)
3
Image Processing Processor Monitor Memory
4
Java Graphics Packages Graphics Methods: Point (Abstract) Line Rect fillRect Oval fillOval Graphics2D Classes: Point (Abstract) Line Rectangle2D Ellipse2D
5
Graphics in Java Point (Graphics2D): o An abstract class- cannot be instantiated o Instead a very short line can be made Line Method (Graphics): o g.drawLine(x1, y1, x2, y2); Line Class (Graphics2D): o g.draw(new Line(x1, y1, x2, y2)); (x2, y2) (x1, y1)
6
Graphics in Java Rectangle Method (Graphics): o g.drawRect(posX, posY, width, height) Rectangle2D Class (Graphics2D): o g.draw(new Rectangle(posX, posY, width, height)) (posX, posY) width (posX, posY) height
7
Graphics in Java Oval Method (Graphics): o g.drawRect(posX, posY, width, height) Ellipse2D Class (Graphics2D): o g.draw(new Ellipse2D.Double(posX, posY, width, height)) (posX, posY) width (posX, posY) height
8
Draw Area Paint Program
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.