上海交通大学交大密西根 联合学院·一 UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Common Operation In every graphics program,you need to declare an object with of class GwindowsT or its derived class like DoorWayT class DoorWayT:public GwindowsT public: double cx cyi double width,height DoorWayT (const double windWidth,const double windHeight); void draw (const double llx,const double lly); void draw(const double llx const double lly,string clr)j void disp 0;
Common Operation Common Operation • In every graphics program, you need to declare an object with of class GwindowsT or its derived class like DoorWayT
上海交通大学交大密西根 联合学院·一 18T UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Example ● Now that we Graphics Example introduced the functions exported by the library,we will start with this example of drawing a doorway.We want to draw this simple shape centered in the graphics window
Example Example • Now that we introduced the functions exported by the library, we will start with this example of drawing a doorway. We want to draw this simple shape centered in the graphics window