GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Example code to define and save a projection

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



Although you can define a projection in the program that uses it, in practice you would probably build up a library of projections for standard documents, and restore them as needed. Here is a piece of code that defines and stores the projection shown in Figure 24 in topic 6.5. The projection contains one transform. The effect of the transform is to extract a 5 inches x 5 inches rectangular sub-image, alter its size, and position it in the top-left-hand corner of the target. Later on, another example program restores and uses the projection.


     CALL IMPCRT(15);             /* Create projection with id of 15 */

/* proj-id coord-type l-edge r-edge top-edge bot-edge */ CALL IMREXR(15, 0, 3.0, 8.0, 2.0, 7.0);

/* proj-id h-scale v-scale */ CALL IMRSCL(15, 0.5, 0.5);

/* proj-id coord-type horiz-posn vert-posn mix-mode */ CALL IMRPLR(15, 0, 0.0, 0.0, 0);

/* THIS CALL COMPLETES THE PROJECTION */

/* proj-id name count description protect */ CALL IMPSAV(15, 'EXTRACT', 57, 'Extract a 5 x 5 sub-image & convert it to 2.5 x 2.5 image');

CALL IMPDEL(15); /* Delete projection 15 */

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012