haiku/docs/develop/servers/app_server/ServerBitmap.htm

120 lines
4.7 KiB
HTML
Raw Normal View History

<HTML>
<HEAD>
<TITLE>ServerBitmap.htm</TITLE>
<style type="text/css">
<!--
.Default {background-color: rgb(255,255,255); color: rgb(0,0,0); font-family: 'Dutch801 Rm BT'; font-size: 12pt}
.OBOS-Function-Def {background-color: rgb(255,255,255); color: rgb(0,0,0); font-family: 'Dutch801 Rm BT'; font-size: 16pt}
.OBOS-Title {background-color: rgb(255,255,255); color: rgb(0,128,0); font-family: 'Dutch801 Rm BT'; font-size: 24pt}
.Text-Background {background-color: rgb(255,255,255)}
.GR-Default {}
.Body {margin: 0px}
.Footer {margin: 0px}
.Header {margin: 0px}
.WP-Default {text-align: left; text-indent: 0px; margin-left: 0px; margin-right: 0px}
-->
</style>
</HEAD>
<BODY BGCOLOR="#ffffff">
<DIV class="sheet" id="Sheet 1">
<P class="Body" style="margin: 0px"><span class="OBOS-Title">ServerBitmap class</span><span style="color: rgb(0,0,0); font-size: 24pt"></span></P>
<P class="Body" style="margin: 0px"><BR>
</P>
<P class="Body" style="margin: 0px">ServerBitmaps are the server side counterpart to BBitmap. Note that they are not allocated like other objects - the BitmapManager handles all allocation and deletion tasks.</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<HR>
</P>
<P class="Body" style="margin: 0px"><BR>
Member Functions</P>
<P class="Body" style="margin: 0px"><BR>
</P>
<TABLE WIDTH=466 HEIGHT=103 BORDER=1 CELLPADDING=1 CELLSPACING=2>
<TR>
<TD WIDTH=253 HEIGHT=47>
<P class="Body" style="margin: 0px">ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)</P>
</TD>
<TD WIDTH=213 HEIGHT=47>
<P class="Body" style="margin: 0px">void _HandleSpace(color_space cs, int32 bytesperline=-1)</P>
</TD>
</TR>
<TR>
<TD WIDTH=253 HEIGHT=22>
<P class="Body" style="margin: 0px">~ServerBitmap(void)</P>
</TD>
<TD WIDTH=213 HEIGHT=22>
<P class="Body" style="margin: 0px">int32 BytesPerRow(void)</P>
</TD>
</TR>
<TR>
<TD WIDTH=253 HEIGHT=17>
<P class="Body" style="margin: 0px">uint8 *Bits(void)</P>
</TD>
<TD WIDTH=213 HEIGHT=17>
<P class="Body" style="margin: 0px">area_id Area(void)</P>
</TD>
</TR>
<TR>
<TD WIDTH=253 HEIGHT=17>
<P class="Body" style="margin: 0px">uint32 BitsLength(void)</P>
</TD>
<TD WIDTH=213 HEIGHT=17>
<P class="Body" style="margin: 0px">BRect Bounds(void)</P>
</TD>
</TR>
</TABLE>
<P class="Body" style="margin: 0px"><BR>
<BR>
Global Functions</P>
<P class="Body" style="margin: 0px"><BR>
If there are any global functions associated with the class, they are listed here.</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<HR>
</P>
<P class="Body" style="margin: 0px"><span class="OBOS-Function-Def">ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)</span></P>
<P class="Body" style="margin: 0px"><BR>
1) Call _HandleSpace()</P>
<P class="Body" style="margin: 0px">2) Call _HandleFlags()</P>
<P class="Body" style="margin: 0px">3) Initialize remaining data members to parameters or safe values</P>
<P class="Body" style="margin: 0px"><span class="Default"><BR>
</span><BR>
<span style="font-size: 16pt">~ServerBitmap(void)</span></P>
<P class="Body" style="margin: 0px"><span class="Default"><BR>
Empty</span></P>
<P class="Body" style="margin: 0px"><span class="Default"><BR>
<BR>
</span><span class="OBOS-Function-Def">uint8 *Bits(void)</span></P>
<P class="Body" style="margin: 0px"><BR>
Returns the bitmap's buffer member</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<span class="OBOS-Function-Def">area_id Area(void)</span></P>
<P class="Body" style="margin: 0px"><BR>
Returns the bitmap's buffer member.</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<span class="OBOS-Function-Def">uint32 BitsLength(void)</span></P>
<P class="Body" style="margin: 0px"><BR>
Returns bytes_per_row * height</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<span class="OBOS-Function-Def">BRect Bounds(void)</span></P>
<P class="Body" style="margin: 0px"><BR>
returns BRect(width-1,height-1)</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<span class="OBOS-Function-Def">int32 BytesPerRow(void)</span></P>
<P class="Body" style="margin: 0px"><BR>
returns the bitmap's bytes_per_row member</P>
<P class="Body" style="margin: 0px"><BR>
<BR>
<span class="OBOS-Function-Def">void _HandleSpace(color_space cs, int32 bytesperline=-1)</span></P>
<P class="Body" style="margin: 0px"><span class="Default"><BR>
Large function which essentially consists of a switch() of the available color spaces and assigns the bits per pixel and bytes per line values based on the color space. If bytesperline is -1, the default is used, otherwise it uses the specified value.</span></P>
<DIV class="layer" id="Layer 1">
</DIV>
</DIV>
</BODY>
</HTML>