COMPOSITE_PATTERN patch instructions. ------------------------------------- Simply introduce the code between the comments, labled with MCA, into the indicated file positions. 1) frame.h: TPATTERN_FIELDS definition union { \ DENSITY_FILE *Density_File; \ /*-added-MCA-990525-*/ \ PIGMENT *Density; \ /*-------MCA--------*/ \ IMAGE *Image; \ 2) parstxtr.c: Parse_Pattern(), in the EXPECT with all other patterns /*-added-MCA-990525-*/ CASE (COMPOSITE_TOKEN) New->Type = COMPOSITE_PATTERN; New->Vals.Density = Create_Pigment(); Parse_Begin(); Parse_Pigment ( &(New->Vals.Density) ); Parse_End(); Post_Pigment(New->Vals.Density); EXIT END_CASE /*-------MCA--------*/ 3) pattern.c: at top with the other #includes /*-added-MCA-990525-*/ #include "pigment.h" /*-------MCA--------*/ 4) pattern.c: at top of Evaluate_TPat () VECTOR TPoint; /*-added-MCA-990525-*/ COLOUR TCol; /*-------MCA--------*/ 5) pattern.c: at end of 'switch (TPat->Type)' body in Evaluate_TPat () /*-added-MCA-990525-*/ case COMPOSITE_PATTERN: Compute_Pigment(TCol, TPat->Vals.Density, TPoint, Intersection); value = (TCol[0]+TCol[1]+TCol[2])/3; break; /*-------MCA--------*/ default: Error("Problem in Evaluate_TPat."); 6) pattern.c: at end of Copy_TPat_Fields () if (Old->Type == DENSITY_FILE_PATTERN) { New->Vals.Density_File = Copy_Density_File(Old->Vals.Density_File); } /*-added-MCA-990525-*/ if (Old->Type == COMPOSITE_PATTERN) { New->Vals.Density = Copy_Pigment(Old->Vals.Density); } /*-------MCA--------*/ } 7) pattern.c: at end of Destroy_TPat_Fields() if (Tpat->Type == DENSITY_FILE_PATTERN) { Destroy_Density_File(Tpat->Vals.Density_File); } /*-added-MCA-990525-*/ if (Tpat->Type == COMPOSITE_PATTERN) { Destroy_Pigment(Tpat->Vals.Density); } /*-------MCA--------*/ } 8) pattern.h: in pattern id definitions - may be #defined #define FUNCTION_PATTERN 33 #define SLOPE_PATTERN 34 #define IMAGE_PATTERN 35 /*-added-MCA-990525-*/ #define COMPOSITE_PATTERN 36 /*-------MCA--------*/ - or as an enum FUNCTION_PATTERN, SLOPE_PATTERN, /* NK 1998 */ IMAGE_PATTERN, /* NK ---- */ /*-added-MCA-990525-*/ COMPOSITE_PATTERN /*-------MCA--------*/ }; - or something else similar, depending on which source you have. Put it in as the last pattern identifier.