home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1990
/
18
/
metarect.c
< prev
next >
Wrap
Text File
|
1990-07-11
|
897b
|
29 lines
/*----------------------------------------------------------
METARECT.C -- A function to obtain a metafile image size
(c) Ziff Communications Co, 1990
PC Magazine * Charles Petzold, 7/90
----------------------------------------------------------*/
VOID QueryMetaFileBoundaryRect (HAB hab, HMF hmf, RECTL *prcl)
{
HPS hps ;
SIZEL sizlPage ;
sizlPage.cx = 100 ;
sizlPage.cy = 100 ;
hps = GpiCreatePS (hab, NULL, &sizlPage, PU_ARBITRARY) ;
GpiSetDrawControl (hps, DCTL_DISPLAY, DCTL_OFF) ;
GpiSetDrawControl (hps, DCTL_BOUNDARY, DCTL_ON) ;
GpiPlayMetaFile (hps, hmf, 0L, NULL, NULL, 0L, NULL) ;
GpiSetDrawControl (hps, DCTL_DISPLAY, DCTL_ON) ;
GpiSetDrawControl (hps, DCTL_BOUNDARY, DCTL_OFF) ;
GpiQueryBoundaryData (hps, prcl) ;
GpiDestroyPS (hps) ;
}