#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <WSCvdrawingArea.h>

void expose_ep(WSCbase* object){
  //drawing_a is same as newvdra_000...
  //You can get it extern WSCvdrawingArea* newvdra_000; also.
  WSCvdrawingArea* drawing_a =(WSCvdrawingArea*)object->cast("WSCvdrawingArea");
  if (drawing_a == NULL){
    return;
  }


  drawing_a->setForeColor("#ff0000");
  drawing_a->drawLine(50,50,100,100);

  drawing_a->setForeColor("#ffff00");
  drawing_a->drawRect(150,50,100,100);

  drawing_a->setForeColor("#00ff00");
  drawing_a->drawFillRect(20,100,50,50);

  drawing_a->setForeColor("#0000ff");
  drawing_a->drawArc(50,200,50,50,60*64,270*64);

  drawing_a->setForeColor("#ff00ff");
  drawing_a->setHatchPattern(7);
  drawing_a->drawFillArc(150,200,100,50,60*64,270*64, 0 /*PIE*/ );

  drawing_a->setForeColor("#ff00ff");
  drawing_a->setHatchPattern(6);
  drawing_a->drawFillArc(250,200,100,50,60*64,270*64, 1 /*CHORD*/ );


  WSCpoint pt[3];
  pt[0].x = 300;
  pt[0].y = 300;
  pt[1].x = 330;
  pt[1].y = 330;
  pt[2].x = 300;
  pt[2].y = 330;

  drawing_a->setForeColor("#00ffff");
  drawing_a->setHatchPattern(0);
  drawing_a->drawFillPoly(pt,3);

  drawing_a->setForeColor("#000000");
  drawing_a->drawString(100,300,100,30,0,WS_CENTER,"ABCDE1234");



}
static WSCfunctionRegister  op("expose_ep",(void*)expose_ep);
