Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

cntutil.c File Reference

#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "idcnt.h"
#include "idcalc.h"
#include "iderr.h"
#include "idprint.h"

Go to the source code of this file.

Defines

#define CRR(t1, t2)
#define CFR(PPt)

Functions

int _IdCntAddPoint (PCONTOUR_USHORT *contour, int valx, int valy)
int _IdCntInsertPoint (PCONTOUR_USHORT *contour, int numPoint, int valx, int valy)
int IdCntMoveContour (PCONTOUR_USHORT contour, int deltaX, int deltaY)
int IdCntRotateContour (PCONTOUR_USHORT contour, int centreX, int centreY, double angle)
int IdCntRotateContourDouble (PCONTOUR_DOUBLE contour, int centreX, int centreY, double angle)
int IdCntZoomContourDouble (PCONTOUR_DOUBLE contour, int centreX, int centreY, double percent)
int IdCntDelPoint (PCONTOUR contour, int numPoint)
int IdCntDelPoints (PCONTOUR contour, int numPoint1, int numPoint2)
PCONTOUR IdCntConcat (PCONTOUR contour1, PCONTOUR contour2)
PCONTOUR IdCntClear (PCONTOUR cont)
PCONTOUR IdCntCopy (PCONTOUR ims, PCONTOUR imd)
PCONTOUR IdCntCast (PCONTOUR ims, PCONTOUR imd)


Define Documentation

#define CFR PPt   ) 
 

Value:

switch ( IdCntType(imd) ) { \ case CNT_CHAR : CRR(PPt,PCONTOUR_CHAR); break; \ case CNT_UCHAR : CRR(PPt,PCONTOUR_UCHAR); break; \ case CNT_SHORT : CRR(PPt,PCONTOUR_SHORT); break; \ case CNT_USHORT : CRR(PPt,PCONTOUR_USHORT); break; \ case CNT_LONG : CRR(PPt,PCONTOUR_LONG); break; \ case CNT_ULONG : CRR(PPt,PCONTOUR_ULONG); break; \ case CNT_FLOAT : CRR(PPt,PCONTOUR_FLOAT); break; \ case CNT_DOUBLE : CRR(PPt,PCONTOUR_DOUBLE); break; \ default : IdErrno=IDERR_WRONG_TYPE; \ IdPrintf("Type non Traite1 %x\n",IdCntType(imd) ); \ return 0; }

Referenced by IdCntCast().

#define CRR t1,
t2   ) 
 

Value:

for(i=0;i<IdCntDimX(ims);i++) \ { ((t2)imd)[i].x = ((t1)ims)[i].x; \ ((t2)imd)[i].y = ((t1)ims)[i].y; \ }


Function Documentation

int _IdCntAddPoint PCONTOUR_USHORT contour,
int  valx,
int  valy
 

Definition at line 86 of file cntutil.c.

References IdCntDimX, IdCntModifLongueur(), IdCntSetX, IdCntSetY, and IdCntUsedNbX.

int _IdCntInsertPoint PCONTOUR_USHORT contour,
int  numPoint,
int  valx,
int  valy
 

Definition at line 145 of file cntutil.c.

References CNT, IdCntAddPoint, IdCntDimX, IdCntGetUsedNbX, IdCntGetX, IdCntGetY, IdCntModifLongueur(), IdCntSetUsedNbX, IdCntSetX, IdCntSetY, IdCntUsedNbX, IDERR_INVALID_NUMBER, IDERR_POINTER_IS_NULL, IDERR_WRONG_TYPE, IdErrno, IdErrPrintf(), and IdLibidoType.

PCONTOUR IdCntCast PCONTOUR  ims,
PCONTOUR  imd
 

Definition at line 763 of file cntutil.c.

References CFR, CNT_CHAR, CNT_DOUBLE, CNT_FLOAT, CNT_LONG, CNT_SHORT, CNT_UCHAR, CNT_ULONG, CNT_USHORT, IdCntCopy(), IdCntGetUsedNbX, IdCntSameSize, IdCntSetUsedNbX, IdCntType, IDERR_WRONG_DIM, IDERR_WRONG_TYPE, IdErrno, IdPrintf(), PCONTOUR, PCONTOUR_CHAR, PCONTOUR_FLOAT, PCONTOUR_LONG, PCONTOUR_SHORT, PCONTOUR_UCHAR, and PCONTOUR_ULONG.

PCONTOUR IdCntClear PCONTOUR  cont  ) 
 

Definition at line 671 of file cntutil.c.

References CNT, IdCntDimX, IdCntSetUsedNbX, IDERR_POINTER_IS_NULL, IDERR_WRONG_TYPE, IdErrno, IdLibidoType, IdSizeOfType, and PCONTOUR.

PCONTOUR IdCntConcat PCONTOUR  contour1,
PCONTOUR  contour2
 

Definition at line 609 of file cntutil.c.

References CNT, IdCntDimX, IdCntModifLongueur(), IdCntSameType, IdCntSetUsedNbX, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IDERR_WRONG_TYPE, IdErrno, IdLibidoType, IdSizeOfType, and PCONTOUR.

PCONTOUR IdCntCopy PCONTOUR  ims,
PCONTOUR  imd
 

Definition at line 719 of file cntutil.c.

References IdCntDimX, IdCntGetUsedNbX, IdCntSameSizeAndType, IdCntSetUsedNbX, IDERR_WRONG_DIM, IdErrno, IdSizeOfType, and PCONTOUR.

Referenced by IdCntCast().

int IdCntDelPoint PCONTOUR  contour,
int  numPoint
 

Definition at line 488 of file cntutil.c.

References CNT, IdCntGetUsedNbX, IdCntSetUsedNbX, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IDERR_WRONG_TYPE, IdErrno, IdLibidoType, and IdSizeOfType.

int IdCntDelPoints PCONTOUR  contour,
int  numPoint1,
int  numPoint2
 

Definition at line 548 of file cntutil.c.

References CNT, IdCntGetUsedNbX, IdCntSetUsedNbX, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IDERR_WRONG_TYPE, IdErrno, IdLibidoType, and IdSizeOfType.

int IdCntMoveContour PCONTOUR_USHORT  contour,
int  deltaX,
int  deltaY
 

Definition at line 224 of file cntutil.c.

References IdCntGetX, IdCntGetY, IdCntSetX, IdCntSetY, IdCntUsedNbX, IDERR_POINTER_IS_NULL, and IdErrno.

int IdCntRotateContour PCONTOUR_USHORT  contour,
int  centreX,
int  centreY,
double  angle
 

Definition at line 273 of file cntutil.c.

References IdCntGetX, IdCntGetY, IdCntSetX, IdCntSetY, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IdErrno, and x.

int IdCntRotateContourDouble PCONTOUR_DOUBLE  contour,
int  centreX,
int  centreY,
double  angle
 

Definition at line 338 of file cntutil.c.

References IdCntGetX, IdCntGetY, IdCntSetX, IdCntSetY, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IdErrno, PCONTOUR_DOUBLE, and x.

int IdCntZoomContourDouble PCONTOUR_DOUBLE  contour,
int  centreX,
int  centreY,
double  percent
 

Definition at line 412 of file cntutil.c.

References IdCalcDistance2Points(), IdCntGetX, IdCntGetY, IdCntRectEnglob(), IdCntSetX, IdCntSetY, IdCntUsedNbX, IDERR_POINTER_IS_NULL, IdErrno, and x.


Generated on Wed Oct 19 09:28:35 2005 for SIMRI3D by doxygen 1.3.7