Application Example

Define the data type of the pointing entries.

 TextPt {
	string   Text;			/* for a comment */
	int	 x,y ;
 } ;
 WinPt {
	set_of(TextPt)	  memo ;
	int		  x1,y1 ;	/* upper left corner */
	int		  x2,y2 ;	/* lower right corner */
 } ;

 
Write code for the deriving procedure using an image still as an argument and creates an instance of WinPt.

Mapping function takes an original image and WinPt instance as an argument, and create image data.