void * GeoFree(
void * blockPtr, /* address of memory to free */
GeodeHandle geodeHan); /* owner of block to be used */
The routine
malloc()
can free only memory in the malloc-block belonging to the calling geode. If you want to free memory in another geode's malloc-block, call
GeoFree()
. Passing a null
GeodeHandle
will make
GeoMalloc()
act on memory in the calling geode's malloc-block.
Include: geode.h
Warnings: Pass exactly the same address as the one returned to you when you allocated the memory. If you pass a different address,
GeoFree()
will take unpredictable actions, including possibly erasing other memory or crashing the system.
See Also: free().
void * GeoMalloc(
size_t blockSize, /* # of bytes to allocate*/
GeodeHandle geodeHan, /* Owner of block to be used */
word zeroInit); /* Zero-initialize memory? */
The routine
malloc()
automatically allocates memory in the malloc-block belonging to the calling geode. It does not zero-initialize the memory. If you want to zero-initialize the memory, or want to allocate it in another geode's malloc-block, call
GeoMalloc()
. Pass
true
(i.e., non-zero) in
zeroInit
to zero-initialize the memory.
Passing a null
GeodeHandle
will make
GeoMalloc()
allocate the memory in the calling geode's malloc-block. If "zeroInit" is true, the memory will be initialized to null bytes; otherwise, the memory will be left uninitialized.
Include: geode.h
Warnings: All memory allocated with
malloc()
is freed when GEOS shuts down.
See Also: malloc().
void * GeoReAlloc(
void * blockPtr, /* address of memory to resize */
size_t newSize, /* New size in bytes */
GeodeHandle geodeHan); /* Owner of block to be used */
The routine
realloc()
can resize only memory in the malloc-block belonging to the calling geode. If you want to resize memory in another geode's malloc-block, call
GeoReAlloc()
. Passing a null
GeodeHandle
will make
GeoReAlloc()
act on memory in the calling geode's malloc-block.
If the block is resized larger, the new memory will not be zero-initialized. Resizing a block smaller will never fail. If
GeoReAlloc()
fails, it will return a null pointer (zero). If you pass a
newSize
of zero, the passed block pointer is freed and the return pointer is a null pointer.
Include: geode.h
Warnings: Pass exactly the same address as the one returned to you when you allocated the memory. If you pass a different address,
GeoReAlloc()
will take unpredictable actions, including possibly erasing other memory or crashing the system.
See Also: realloc().
void GrApplyRotation(
GStateHandle gstate, /* GState to alter */
WWFixedAsDWord angle); /* degrees counterclockwise */
Apply a rotation to the GState's transformation matrix.
Include: graphics.h
void GrApplyScale(
GStateHandle gstate, /* GState to alter */
WWFixedAsDWord xScale, /* new x scale factor */
WWFixedAsDWord yScale); /* new y scale factor */
Apply a scale factor to the GState's transformation matrix.
Include: graphics.h
void GrApplyTransform(
GStateHandle gstate, /* GState to draw to */
const TransMatrix *tm); /* transformation matrix to apply */
Apply a transformation, expressed as a transformation matrix, to a GState's coordinate system.
Include: graphics.h
GEOS SDK TechDocs
|
|
GeodeLoadDGroup ...
|
GrApplyTranslation() ...