GraphicsACMIntro-1

GraphicsACMIntro-1 - CS 1705 Intro to Object-Oriented...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 1705 Intro to Object-Oriented Design I ObjectDraw Intro Intro ACM Graphics Intro to Object-Oriented Dev I Computer Science Dept Va Tech Jan. 2006 ©2006 Barnette, ND 1 Intro ACM Graphics s ACM Graphics – graphics library built on top of the Java graphics libraries. s acm.jar - A suite of Java classes providing a graphical Application Programming Interface (API) & auxiliary classes used to illustrate graphical concepts we will study in this course s We will learn how to write instruction-sets (programs) with simple front-end graphical user interfaces (GUIs) for back-end problem solution code. Intro ACM Graphics Intro to Object-Oriented Dev I Computer Science Dept Va Tech Jan. 2006 ©2006 Barnette, ND 2 Screen Coordinate System s Computer screens (and windows) composed of pixel coordinates Similar to Cartesian coordinate system Pixels (picture elements) are the points of the system Upper left corner is the origin location Positive y-axis is upside down Coordinates are relative to a specific window (or the entire screen) Canvas - area of a window available for drawing 0 x axis 0 (x,y) (column, row) screen coordinate system y axis
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 1705 Intro to Object-Oriented Design I ObjectDraw Intro Intro ACM Graphics Intro to Object-Oriented Dev I Computer Science Dept Va Tech Jan. 2006 ©2006 Barnette, ND 3 Hello World in objectdraw s Hello World Code: GraphicsProgram is a class in the acm library. BlueJ: right-click> Run ACM Program import acm.graphics.*; import acm.program.*; public class HelloWorld extends GraphicsProgram { public void run( ) { add( new GLabel( "Hello World", 20, 30) ); } } Intro ACM Graphics Intro to Object-Oriented Dev I
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/30/2011 for the course ART 3514 taught by Professor Dhbannan during the Summer '03 term at Virginia Tech.

Page1 / 6

GraphicsACMIntro-1 - CS 1705 Intro to Object-Oriented...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online