Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann.

Similar presentations


Presentation on theme: "CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann."— Presentation transcript:

1 CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann

2 Michael Eckmann - Skidmore College - CS 102 - Spring 2009 Today’s Topics Questions/comments? Chapter 5 –Drawing with drawing commands –Drawing our own pictures

3 Michael Eckmann - Skidmore College - CS 102 - Spring 2009 Drawing commands JES provides the following functions for drawing on a picture: –addText(pic, x, y, text)‏ pic is a picture object x and y are integers text is a string Puts the text on the picture starting at the pixel at x,y –addLine(pic, x1, y1, x2, y2)‏ Draws a line on the pic from x1,y1 to x2, y2 –addRect(pic, x, y, w, h)‏ Draws a rectangle with upper-left corner at x,y with a width of w and height of h –addRectFilled(pic, x, y, w, h, color) --- guess what this does Let's try some of these now

4 Michael Eckmann - Skidmore College - CS 102 - Spring 2009 Drawing our own pictures Let's try to draw a square picture that contains non-filled squares inside each other separated by 2 pixels. How might we go about this?

5 Michael Eckmann - Skidmore College - CS 102 - Spring 2009 Drawing our own pictures Let's look at the greyeffect.jpg picture from our text and see if we can write a program to create it.


Download ppt "CS 102 Computers In Context (Multimedia)‏ 03 / 20 / 2009 Instructor: Michael Eckmann."

Similar presentations


Ads by Google