Unit 'agraphics' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

SetMaxPen

Set maximum pen value for a rastport

Declaration

Source position: agraphics.pas line 2139

procedure SetMaxPen(

  Rp: PRastPort;

  MaxPen: LongWord

);

Arguments

Rp

  

A pointer to a RastPort

MaxPen

  

A longword pen value.

Description

This will instruct the graphics library that the owner of the rastport will not be rendering in any colors whose index is >maxpen. If there are any speed optimizations which the graphics device can make based on this fact (for instance, setting the pixel write mask), they will be done.

Basically this call sets the rastport mask, if this would improve speed. On devices where masking would slow things down (like with chunky pixels), it will be a no-op.

The maximum pen value passed must take into account not only which colors you intend to render in the future, but what colors you will be rendering on top of. SetMaxPen(rp, 0); doesn't make much sense.

See also

SetWriteMask

  

Set the pixel write mask value for a RastPort


Documentation generated on: 2021-07-30