#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSCvdrawingArea.h>
void drawep(WSCbase* object){
  //do something...
  WSCvdrawingArea* drawing_a =(WSCvdrawingArea*)object->cast("WSCvdrawingArea");
  if (drawing_a == NULL){
    return;
  }
  drawing_a->drawString(100,20,100,20,0,WS_LEFT,"ABCDE");
  drawing_a->setHatchPattern(1);
  WSCpoint pt[4];
  pt[0].x = 100;
  pt[0].y = 100;
  pt[1].x = 200;
  pt[1].y = 100;
  pt[2].x = 200;
  pt[2].y = 200;
  pt[3].x = 100;
  pt[3].y = 200;
  drawing_a->drawLines(pt,4);

  drawing_a->drawArc(300,10,30,30,0,360*60);
  drawing_a->drawArc(50,50,50,80,0,360*60);
//  drawing_a->setForeColor("#ff0000");
//  drawing_a->setBackColor("#800000");
  drawing_a->drawFillArc(100,50,50,80,0,360*64,WS_PI);
  drawing_a->drawArc(200,200,50,80,0,300*64);
  drawing_a->drawFillArc(150,200,50,80,0,300*64,WS_PI);
  drawing_a->drawFillArc(50,200,50,50,0,270*64,WS_NOPI);
  drawing_a->setForeColor("#00ff00");
  drawing_a->setBackColor("#008800");
  drawing_a->setHatchPattern(0);
  drawing_a->drawFillString(010,10,100,20,0,WS_LEFT,"¾Æ¾ß¾î¿©");
  drawing_a->drawRect(10,10,100,100);
  drawing_a->drawLine(0,0,100,100);
  drawing_a->drawLine(0,0,0,100);
  drawing_a->drawLine(0,0,100,0);
//  drawing_a->setForeColor("#000000");
//  drawing_a->setBackColor("#000000");

//  drawing_a->drawFillRect(10,50,100,20);
  long i;
  for(i=0; i<8; i++){
    drawing_a->setHatchPattern(i);
    drawing_a->drawFillRect(10,50 + 20*i,16,16);
  }
  drawing_a->drawStretchedImage(200,100,96,128,"01.jpg");
//  drawing_a->drawImage(200,100,800,800,"01.jpg",WS_CENTER);
//  drawing_a->drawImage(200,100,32,48,"01.jpg",WS_CENTER);
//  drawing_a->drawImage(200,100,32,32,"01.xpm",WS_CENTER);
}
static WSCfunctionRegister  op("drawep",(void*)drawep);
