lab6.c - #include #include #include...

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

View Full Document Right Arrow Icon
#include <stdio.h> #include <draw.h> #include <math.h> void draw_stripes(void); void draw_bluesquare(int z, int w); void draw_cyansquare(int z,int w); int main(int argc, char * argv[]) { //int z; int x=0; int y=0 ; for(x=0;x<=330;x++) { draw_begin(); x=x+10; draw_setColor("rgb(200,200,200)"); draw_moveTo(x,0); draw_lineTo(x,330); draw_finish(); } for(y=0;y<=320;y++) { draw_begin(); draw_setColor("rgb(200,200,200)"); draw_moveTo(0,y); draw_lineTo(325,y); y=y+10; draw_finish(0); }
Image of page 1

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

View Full Document Right Arrow Icon
// Begin drawing a path draw_begin(); // Set the color for this path to orange draw_setColor("Green"); // Move to the starting point, at coordinates (100, 100) draw_moveTo(0, 0); // Draw a vertical line (same x position, new y position) draw_lineTo(0,40); // Draw a horizontal line (new x position, same y position) draw_lineTo(40, 40); // Draw a line back to the starting point draw_lineTo(40, 0); // Render this path, and fill it in draw_finish(1); draw_begin(); draw_setColor("Black"); draw_arc(100,50,40,0,M_PI * 2,0); draw_finish(); draw_begin(); draw_setColor("Orange"); draw_arc(150,54,40,9.4,M_PI * 2,0); draw_finish(1); draw_begin(); draw_setColor("Blue"); draw_arc(200,50,40,4.7,M_PI * 2.5,0); draw_finish(1); // Begin drawing a path draw_begin(); // Set the color for this path to orange
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern