| Class | Fox::FXBitmap |
| In: |
rdoc-sources/FXBitmap.rb
|
| Parent: | FXDrawable |
A bitmap is a rectangular array of pixels. It supports two representations of these pixels: a client-side pixel buffer, and a server-side pixmap which is stored in an organization directly compatible with the screen, for fast drawing onto the device. The server-side representation is not directly accessible from the current process at it lives in the process of the X server or GDI (on Microsoft Windows). The client-side pixel array is of size height x (width+7)/8 bytes; in other words, 8 pixels packed into a single byte, starting with bit zero on the left.
| BITMAP_KEEP: | Keep pixel data in client |
| BITMAP_OWNED: | Pixel data is owned by image |
| BITMAP_SHMI: | Using shared memory image |
| BITMAP_SHMP: | Using shared memory pixmap |
Return an initialized FXBitmap instance. If a client-side pixel buffer (the pixels argument) has been specified, the bitmap does not own that pixel buffer unless the BITMAP_OWNED flag is set. If the BITMAP_OWNED flag is set, but a nil value for pixels is passed in, a pixel buffer will be automatically created and will be owned by the bitmap. The flags BITMAP_SHMI and BITMAP_SHMP may be specified for large bitmaps to instruct FXBitmap#render to use shared memory to communicate with the server.