Re: [Alephmodular-devel] Brainstorming on bitmaps
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2003-02-22 10:49:35
|
Additional information on buffers and bitmaps, here's my initial definitions of each. -Jeremy Parsons Buffers A buffer is a complete description of a surface that one can draw upon. It is an abstract base class with platform specific implementations. For instance, under Macintosh, a buffer would wrap around a GWorldPtr/CGraftPtr/GrafPtr. Typical usage would be: Request current buffer from display system (it is limited as in dimensions, display system knows this) Lock down the buffer Get a bitmap from the buffer Render operations on the bitmap Release the bitmap Perform drawing operations on the buffer (access to platform native elements available?) Unlock the buffer Ask display system to swap buffers A buffer helps support higher level options such as copying portions and displaying text using OS specific calls. world_pixels would be a buffer. Bitmaps A bitmap, in contrast to a buffer, is a low level object that explicitly describes the pixels associated with a buffer. It knows very little, but is a stream of bytes in memory with precalculated row-addresses for jumping quickly to a scan line. RLE encoded shapes are also implemented as a bitmap that is owned by a collection. world_pixels_structure would be a bitmap. |