imageprocessing/fileFunctions.c
void writeFeature(POINT_T* pHead,int featureId,FILE* pOut,int color)
{
    POINT_T * pCurrent = pHead;
    int useColor = color;
    if (useColor == 0)
       useColor = (featureId*20)%255;
    /* final item is color - want each feature to contrast with previous */
    fprintf(pOut,"-FIGURE %d L %d %d\n",featureId,
	    listSize(pHead),useColor);
    fflush(pOut);
    while (pCurrent != NULL)
      {
      fprintf(pOut,"-COORDS %.2lf %.2lf 0\n", 
	      (double) pCurrent->x,(double) pCurrent->y);
      fflush(pOut);
      pCurrent = pCurrent->next;
      }
}
/* Write a feature to the output file.
 * Currently this is in Dragon Vector format
 * @param pHead        Starting point of feature
 * @param featureId    Numeric Id of the feature
 * @param pOut         File pointer for open text file.
 * @param color        If zero, calculate, otherwise use this color
 */
Write a feature to the output file.
Currently this is in Dragon Vector format
@param pHead        Starting point of feature
@param featureId    Numeric Id of the feature
@param pOut         File pointer for open text file.
@param color        If zero, calculate, otherwise use this color
Write a feature to the output file . Currently this is in Dragon Vector format @param pHead Starting point of feature @param featureId Numeric Id of the feature @param pOut File pointer for open text file . @param color If zero calculate otherwise use this color
void writeFeature(POINT_T* pHead,int featureId,FILE* pOut,int color)
{
    POINT_T * pCurrent = pHead;
    int useColor = color;
    if (useColor == 0)
       useColor = (featureId*20)%255;
    fprintf(pOut,"-FIGURE %d L %d %d\n",featureId,
	    listSize(pHead),useColor);
    fflush(pOut);
    while (pCurrent != NULL)
      {
      fprintf(pOut,"-COORDS %.2lf %.2lf 0\n", 
	      (double) pCurrent->x,(double) pCurrent->y);
      fflush(pOut);
      pCurrent = pCurrent->next;
      }
}
void writeFeature ( POINT_T * pHead , int featureId , FILE * pOut , int color ) { POINT_T * pCurrent = pHead ; int useColor = color ; if ( useColor == 0 ) useColor = ( featureId * 20 ) % 255 ; fprintf ( pOut , " \n " , featureId , listSize ( pHead ) , useColor ) ; fflush ( pOut ) ; while ( pCurrent != NULL ) { fprintf ( pOut , " \n " , ( double ) pCurrent -> x , ( double ) pCurrent -> y ) ; fflush ( pOut ) ; pCurrent = pCurrent -> next ; } }
Write a feature to the output file.
Write a feature to the output file .
/* final item is color - want each feature to contrast with previous */