Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > 8079d983ecf371717db799dd75bd56c2 > files > 14

libopenrm1-1.5.2-2mdv2007.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html><head><title>OpenRM - RM Library (rmbitmap.c)</title></head>
<body bgcolor=white fgcolor=black>
<table width="100%" border=2 cellspacing=0 cellpadding=0 bgcolor="khaki" valign="center">
<th><img src="./images/ormsg.gif">
</th>
</table>
<spacer type=vertical size=15>
<h2>Index of OpenRM - RM Library</h2>
<spacer type=vertical size=15>
<a name="rmBitmapNew"> 
<pre><b>
 RMbitmap * rmBitmapNew (int width,
	                 int height)
</b></pre>
<pre>
 int width, height - integer values that specify the width and height
    of the bitmap (input).
</pre>
<menu><P>
 Creates a new RMbitmap object. The size of the bitmap will be
 (width,height), and remains fixed for the lifetime of the object. The
 bitmap data is initialized by this routine to all zeros.
</P>
<P>
 Returns a handle to the new object upon success, or NULL upon
 failure.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapCopy"> 
<pre><b>
 RMenum rmBitmapCopy (RMbitmap *dst,
	              const RMbitmap *src)
</b></pre>
<pre>
 RMbitmap *dst - the destination RMbitmap object (output).
 
 const RMbitmap *src - the source RMbitmap object (input).
</pre>
<menu><P>
 Copies the bitmap data from one RMbitmap object to another. Both
 RMbitmaps must be fully configured (created with rmBitmapNew), and
 must be the same size. Size information may be obtained with
 rmBitmapGetSize, but is set at the time the RMbitmap is created with
 rmBitmapNew.
</P>
<P>
 Returns RM_CHILL to the caller upon success, or RM_WHACKED upon
 failure.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapDup"> 
<pre><b>
 RMbitmap *rmBitmapDup (const RMbitmap *src)
</b></pre>
<pre>
 const RMbitmap *src - a handle to a source RMbitmap object.
</pre>
<menu><P>
 Creates a new RMbitmap object that is an exact replica of an existing
 one. Upon return from this routine, the new RMbitmap object is an
 exact duplicate, except that both source and destination RMbitmap
 objects have their own buffers. A change to one will not affect the
 other.
</P>
<P>
 Returns a handle to a new RMbitmap object upon success, or NULL upon
 failure.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapDelete"> 
<pre><b>
 void rmBitmapDelete (RMbitmap *toDelete)
</b></pre>
<pre>
 RMbitmap *toDelete - a handle to the RMbitmap object to be deleted.
</pre>
<menu><P>
 Releases resources associated with an RMbitmap object. This routine
 is the opposite of rmBitmapNew().
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapSetPixelData"> 
<pre><b>
 RMenum rmBitmapSetPixelData (RMbitmap *toModify,
		              const void *pixeldata)

</b></pre>
<pre>
 RMbitmap *toModify - a handle to the RMbitmap object who's bitmap
     data will be modified by this call (input).

 const void *pixeldata - a handle to the raw bitmap data.
</pre>
<menu><P>
 Copies bitmap data from the caller's memory into the RMbitmap's
 internal buffer. Unlike other RM objects, RMbitmap objects do not
 allows for shared data management of pixel data.
</P>
<P>
 By convention, bitmap data must be scanline padded to the nearest
 4-byte boundary. This is an artifact of the Win32 OpenGL
 implementation.
</P>
<P>
 Returns RM_CHILL to the caller if the operation was successful,
 otherwise RM_WHACKED is returned.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapGetPixelData"> 
<pre><b>
 void * rmBitmapGetPixelData (const RMbitmap *toQuery)
</b></pre>
<pre>
 const RMbitmap *toQuery - a handle to an RMbitmap object (input).
</pre>
<menu><P>
 Returns to the caller a handle to the raw bitmap data from the bitmap
 object upon success, otherwise NULL is returned. The data can be
 interpreted as raw byte data, where the high order bit of the first
 byte corresponds to the upper-left most bit in the image.
</P>
<P>
 Use rmBitmapSetPixelData() to set this data (in toto), or
 rmBitmapSetBit to turn on a single bit. Use rmBitmapGetSize() to
 query the dimensions of the bitmap.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapGetSize"> 
<pre><b>
 RMenum rmBitmapGetSize (const RMbitmap *toQuery,
		         int *width_return,
			 int *height_return,
			 int *bytes_width_return)

</b></pre>
<pre>
 const RMbitmap *toQuery - a handle to the RMbitmap object to query.
 
 int *width_return, *height_return - pointers to caller-supplied int's
    that will be set to contain the width and height dimensions of the
    the bitmap.

 int *bytes_width_return - pointer to caller-supplied int. This will
    be set to reflect the real number of bytes per scanline in the
    RMbitmap objects pixel buffer. This value is computed by RM to
    honor local pixel storage restrictions. 
</pre>
<menu><P>
 Returns to the caller the width and height of the bitmap of an
 RMbitmap object. Since the number of bytes per scanline of the bitmap
 buffer may not necessarily be equal to width/8, the "real" number of
 bytes per scanline is returned to the caller by this routine.
</P>
<P>
 Returns RM_CHILL upon success, or RM_WHACKED upon failure.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
<a name="rmBitmapSetBit"> 
<pre><b>
 RMenum rmBitmapSetBit (RMbitmap *toModify,
	                int columnIndex,
		        int rowIndex)
</b></pre>
<pre>
 RMbitmap *toModify - a handle to the RMbitmap object to modify.

 int columnIndex, rowIndex - integer values specifying the coordinate
     of the bit to set in terms of index location. 
</pre>
<menu><P>
 This routine is used to set, or turn on, a single bit in an RMbitmap
 object. There is no corresponding routine to turn a bit off. To turn
 a bit off, you have to write the entire bitmap buffer with
 rmBitmapSetPixelData.
</P>
<P>
 Returns RM_CHILL upon success, or RM_WHACKED upon failure.
</P></menu>
<i>librm library source file: rmbitmap.c </i><hr width="75%">
</body></html>