Unit 'layers' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#aros]

DoHookClipRects

Do the given hook for each of the ClipRects

Declaration

Source position: layers.pas line 130

procedure DoHookClipRects(

  Hook: PHook;

  RPort: PRastPort;

  const Rect: PRectangle

);

Arguments

Hook

  

pointer to layer callback Hook which will be called

RPort

  

A pointer to the RastPort that is to be operated on. This function will lock the layer if the RastPort is layered... If the rport is non-layered your hook will be called with the rectangle as passed, the RastPort, and a nil layer...

Rect

  

The bounding rectangle that should be used on the layer. This rectangle "clips" the cliprects to the bound given. If this is NULL, no bounding will take place. must not be nil if the RastPort is non-layered!

Description

This function will call the given hook for each cliprect in the layer that can be rendered into. This is how the backfill hook in Layers is implemented. This means that hidden simple-refresh cliprects will be ignored. It will call the SuperBitMap cliprects, smart refresh off-screen cliprects, and all on screen cliprects. If the rect parameter is not nil, the cliprects are bounded to the rectangle given.

Hook will be called with:

object = PRastPort(Result^.RastPort);
message = [ layer: PLayer, bounds: TRectangle, offsetx: LongInt, offsety: LongInt;]

This hook should fill the Rectangle in the RastPort with the BackFill pattern appropriate for offset x/y.

If hook is LAYERS_BACKFILL, the default backfill is used for the layer.

If hook is LAYERS_NOBACKFILL, the layer will not be backfilled (NO-OP).

Attention

The RastPort you are passed back is the same one passed to the function. You should not use "layered" rendering functions on this RastPort. Generally, you will wish to do BitMap operations such as BltBitMap(). The callback is a raw, low-level rendering call-back. If you need to call a rendering operation with a RastPort, make sure you use a copy of the RastPort and nil the Layer pointer.


Documentation generated on: 2021-07-30