#ifndef  __RV_CUTT_H_INCLUDED_
#define  __RV_CUTT_H_INCLUDED_

  

#include <rvb\rvtypes.h> 

#define CUTT_API  WINAPI




 
extern "C" RvPath CUTT_API   rctCreatePath(UINT length, int channelCount=0, BOOL bAutoRelease=TRUE);
extern "C" void   CUTT_API   rctDestroyPath(RvPath path);
extern "C" int    CUTT_API   rctGetPathLength(RvPath path);
extern "C" int    CUTT_API   rctGetPathChannel(RvPath path);

extern "C" RvPathItem*    CUTT_API  rctGetPathArray(RvPath path);


//construction and destruction
extern "C"  RvCut CUTT_API rvCreateCut(RV_CUT_TYPE type);
extern "C" void  CUTT_API  rvDestroyCut(RvCut self);

extern "C" RvCut CUTT_API rctClone(RvCut self);

//methods
extern "C" void CUTT_API    rctSetGeometry(RvCut self, int index, double val);
extern "C" double CUTT_API  rctGetGeometry(const RvCut self, int index);
extern "C" int  CUTT_API    rctGetGeometryCount(const RvCut self);

//rctCheckGeometry已废除函数
//extern "C" BOOL  CUTT_API   rctCheckGeometry(const RvCut self ,int index, double val);

extern "C" HANDLE  CUTT_API   rctDraw(const RvCut self, HGDC dc,  HANDLE hStroke = NULL  );

//extern "C" HANDLE  CUTT_API   rctDrawE1(const RvCut self, HGDC dc, double dx, double dy, BOOL bActualMap, HANDLE hStroke = NULL  );


extern "C"  RvRect_f64  CUTT_API   rctGetBoundRect(RvCut self );


extern "C" void  CUTT_API   rctMove(RvCut self, double dx, double dy);
extern "C" void  CUTT_API   rctRotate(RvCut self, double cx, double cy, double angle);



extern "C" void  CUTT_API   rctScale(RvCut self, double ratio);
extern "C" void  CUTT_API   rctScaleEx(RvCut self, double ratioX, double ratioY);

extern "C" void  CUTT_API   rctAlign(RvCut self, RvFloat32 dx, RvFloat32 dy, RvFloat32 cx, RvFloat32 cy, RvFloat32 angle, int flags = RV_OA_OFFSET);

extern "C" void CUTT_API  rctSetAlignAngle(RvCut self, RvFloat32 angle);
extern "C" RvFloat32 CUTT_API rctGetAlignAngle(RvCut self  ); 
  
extern "C" RvPoint_f CUTT_API rctGetAlignCenter(RvCut self  ); 
extern "C" void CUTT_API rctSetAlignCenter(RvCut self,  RvFloat32 cx, RvFloat32 cy  ); 

extern "C" RvOffset_f CUTT_API rctGetAlignOffset(RvCut self  ); 
extern "C" void CUTT_API rctSetAlignOffset(RvCut self, RvFloat32 dx, RvFloat32 dy ); 

extern "C" int  CUTT_API rctGetAlignType(RvCut  self);
extern "C" void CUTT_API rctSetAlignType(RvCut  self, int type);


//original
extern "C" void  CUTT_API  rctShot(RvCut self, const RvImage image, double dx=0., double dy=0.);

extern "C" void  CUTT_API  rctShotE1(RvCut self, const RvImage image, double dx  , double dy, const RvMask mask );

extern "C" void  CUTT_API  rctShotE2(RvCut self, const RvImage image, double dx  , double dy, BOOL bNearestSample, const RvMask mask );
  
//extern "C" void CUTT_API   rctSetScale(RvCut self,float ratioX, float ratioY);
//extern "C" void CUTT_API   rctSetScaleX(RvCut self,float ratio );
//extern "C" void CUTT_API   rctSetScaleY(RvCut self,float ratio );

//extern "C" void CUTT_API   rctGetScale(RvCut self, float* pRatioX, float* pRatioY);
//extern "C" float CUTT_API   rctGetScaleX(RvCut self);
//extern "C" float CUTT_API   rctGetScaleY( RvCut self);

extern "C" RV_CUT_TYPE CUTT_API rctGetType(RvCut  self);




extern "C" void    CUTT_API      rctUpdateMap(RvCut self);

#define rctReset(self)   rctUpdateMap(self)



//获得path的数量
extern "C" int    CUTT_API       rctGetCount(RvCut self  );

//path只是map中的一个单个路径。
extern "C" RvPath CUTT_API   rctGetAt(RvCut self, int index  );

//pathmap指整个CURVE表的路径所有路径序列集。
extern "C"  RvSequence CUTT_API   rctGetMap(RvCut self);







#endif