Presentation is loading. Please wait.

Presentation is loading. Please wait.

DrawingPaint What is DrawingPaint ? DrawingPaint operations. What are benefits of DrawingPaint ? Jason Hoang June 2, 2005.

Similar presentations


Presentation on theme: "DrawingPaint What is DrawingPaint ? DrawingPaint operations. What are benefits of DrawingPaint ? Jason Hoang June 2, 2005."— Presentation transcript:

1 DrawingPaint What is DrawingPaint ? DrawingPaint operations. What are benefits of DrawingPaint ? Jason Hoang June 2, 2005

2 What is DrawingPaint ? It is a Paint application to assist users’ design processes. It provides drawing tools to computer users to draw graphics. It allows users to view, edit, and design their drawings through a user friendly GUI.

3 Purpose Paint application are convenient, interactive and automated design processes which assist by computers. A system which is simple, economic, efficient and manageable by applying the whole simulation on a local computer.

4 Overview Sun Microsystems has developed Java language with Object Oriented language.It has a very large class library and hierarchy which helps programmers to simplify their codes such as simplicity and portability by using readily made classes. The Java 2D provides enhanced two– dimensional graphics, text, and image capabilities for Java programs through extensions to the Abstract Windowing Toolkit (AWT).

5 DrawingPaint Operations.

6 Features: Drawing Shapes. Provides drawing tools for drawing line, square, rectangle, circle, oval, arc, rounded rectangle, polygon, and input text string. In DrawingPaint, I create a Shape object, then call either the drawXxx or fillXxx method of the Graphics2D object, supplying the shape object as an argument.

7 Features (cont) public void paintComponent (Graphics g){ // Assume x1, y1, x2, y2, upperLeftX, upperLeftY, xPoints, yPoints, width, and height are instance variables g.drawRect(upperLeftX,upperLeftY,width,width); g.fillRect(upperLeftX,upperLeftY,width,height); g.drawOval(upperLeftX,upperLeftY,width,width); g.fillOval(upperLeftX,upperLeftY,width,height); g.drawArc(upperLeftX,upperLeftY,width,height,90,135); g.drawRoundRect(upperLeftX,upperLeftY,width,height,10,10); g.fillPolygon(xPoints, yPoints, points); g.drawLine(x1,y1,x2,y2);…}

8 Features (cont) Paint Colors Provides various different colors for each fill or outline operation in drawing graphics. Use setColor() to change and retrieve the Paint Color settings.

9 Features (cont) protected void drawCircle(Graphics g) { g.setColor(Color.RED); g.fillOval(upperLeftX,upperLeftY,width,width); …}

10 Features (cont) Edit tools. Provides tools such as zoom, cut, copy, paste, clear, save, and print in efficient ways to add drawing elements to an object oriented language.

11 Questions and Demo.

12 Benefits. DrawingPaint performs a lot of calculations and minimize amounts of necessary work for each operation. In this project DrawingPaint retains both great flexibility and performance.

13 References http://www.skywayradio.com/tech/java/2d http://www.sun.com/ Java 2D Java Programming with JBuilder. Java for Practitioners. Thank you! For your time and patience


Download ppt "DrawingPaint What is DrawingPaint ? DrawingPaint operations. What are benefits of DrawingPaint ? Jason Hoang June 2, 2005."

Similar presentations


Ads by Google