struct Layer_Info * li struct BitMap * bm LONG x0 LONG y0 LONG x1 LONG y1 LONG flags struct Hook * hook struct BitMap * bm2
FUNCTION
Create a new layer at the given position and with the given size. The new layer will be in front of all other layers. If it is a backdrop layer it will be created in front of all other backdrop layers and behind all non backdrop layers. Install the given hook as a backfill hook. This hook will be called whenever a part of the layer is supposed to be filled with a certain pattern. The backfill hook has to do that. If a super bitmap layer is wanted the flags LAYERSUPER and the flag LAYERSMART have to be set and a pointer to a bitmap must also be passed to this function.
INPUTS
li
pointer to LayerInfo structure
bm
pointer to common bitmap x0, y0- upper left corner of the layer x1, y1- lower right corner of the layer
flags
choose the type of layer by setting some flags
hook
pointer to the backfill hook of this layer The backfill hook will be called with
result
>RastPort and message = [ (struct Layer *) layer, (struct Rectangle) bounds, (WORD) offsetx, (WORD) offsety ] bm2 - pointer to optional super bitmap.
RESULT
pointer to layer if successful, NULL otherwise
EXAMPLE
SEE ALSO
NOTES
Does not allow to create layers that are partially outside the given bitmap (, yet).
BUGS
INTERNALS
HISTORY
18.03.1999 bergers
Uses CreateRastPort() and FreeRastPort() for RastPorts and fixes memory leak in layers library.
16.03.1999 bergers
ClipRects are not cached in the LayerInfo structure anymore as this might suggest that there is a memory leak while there is not one. Instead there are cached with every layer individually.
14.03.1999 bergers
These functions do not create layers that are partially outside the screen anymore.
28.02.1999 bergers
All functions use the backfill or blank hook to fill cleared or new areas.
25.02.1999 bergers
Alloc ClipRects are fetched from a pool of cliprects in the LayerInfo and when freed put into that pool.
10.02.1999 bergers
Bugfixes for superbitmapped layers.
26.01.1999 bergers
Added support for superbitmapped layers.
21.01.1999 bergers
Added support for superbitmaps.
11.01.1999 bergers
Lots of new functionalities. Support for backdrop layers.