home *** CD-ROM | disk | FTP | other *** search
-
- RASTPORT.DOC
- (SUP32.LIB and DRES.LIBRARY)
-
- MakeRastPort MakeRastPort
-
- BOOL MakeRastPort(rp, bm, tmprassize, numai)
- RP *rp; D0 D1 D2 A0.W
- BM *bm;
- long tmprassize;
- short numai;
-
- This function fills in an unitialized rastport by InitRastPort()ing it,
- attaching the bitmap, and allocating a TmpRas and AreaInfo structure
- (and associated raster and vector array) according to the following:
-
- tmprassize == -1 Allocate a TmpRas structure and a raster the
- size of one plane of the bitmap.
- 0 Do not allocate a TmpRas structure or raster
- N Allocate a TmpRas structure and raster of size
- N bytes.
-
- numai == 0 Do not allocate an AreaInfo structure or vectors
- N Allocate an AreaInfo and buffer space for N
- vectors (5 bytes per vector).
-
- RESULTS: 0 on failure, 1 on success. If successful the rastport
- will have been initialized with the bitmap attached to the
- rastport. An optional TmpRas and optional AreaInfo
- structure will have been allocated as well as memory
- for the raster itself and area info vectors. The APen
- will be set to 1 and the DrMd to JAM2.
-
- This is an all or nothing function. If it fails, anything
- allocated so far will be freed.
-
-
- FreeRastPort FreeRastPort
-
- (void) FreeRastPort(rp)
- RP *rp;
-
- This function frees memory associated with a rastport but not the
- rastport structure itself. If a TmpRas exists the temporary raster
- and TmpRas structure will be freed. If an AreaInfo exists the
- vector array and AreaInfo structure will be freed. If a BitMap
- exists rp->BitMap will be set to NULL (but the BitMap itself is
- not freed, see FreeBitMap() and FreeRastPortBitMap())
-
-
-
-
-