haiku/docs/develop/servers/app_server/ServerBitmap.rst
Adrien Destugues a5061ecec5 Generate developer docs with Sphinx
An effort was started some time ago to consolidate all internal
documentation in the git tree. However, this was just an accumulation of
files in various formats without any strucutre or way to browse it,
which results in no one even knowing that we have docs here.

This converts most of the files to restructuredtext and uses Sphinx to
generate an HTML browsable user manual (with a table of content and a
first attempt to put things in a global hierarchy).

There are almost no changes to the documentation content in this commit
(some obviously obsolete things were removed). The plan is to get the
toolchain up and running to make these docs easily available, and only
then see about improving the content. We can migrate some things off the
wiki and website, and rework the table of contents to have some more
hierarchy levels because currently it's a bit messy.

Change-Id: I924ac9dc6e753887ab56f18a09bdb0a1e1793bfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4370
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2021-08-27 11:41:17 +00:00

56 lines
1.4 KiB
ReStructuredText

ServerBitmap class
##################
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.
Member Functions
================
ServerBitmap(BRect r, color_space cspace, int32 flags, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID)
---------------------------------------------------------------------------------------------------------------
1. Call \_HandleSpace()
2. Call \_HandleFlags()
3. Initialize remaining data members to parameters or safe values
~ServerBitmap(void)
-------------------
Empty
uint8 \*Bits(void)
------------------
Returns the bitmap's buffer member
area_id Area(void)
------------------
Returns the bitmap's buffer member.
uint32 BitsLength(void)
-----------------------
Returns bytes_per_row \* height
BRect Bounds(void)
------------------
returns BRect(width-1,height-1)
int32 BytesPerRow(void)
-----------------------
returns the bitmap's bytes_per_row member
void _HandleSpace(color_space cs, int32 bytesperline=-1)
---------------------------------------------------------
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.