[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'agraphics' (#aros)


Set maximum pen value for a rastport


Source position: agraphics.pas line 2211

procedure SetMaxPen(

  Rp: PRastPort;

  MaxPen: LongWord





A pointer to a RastPort



A longword pen value.


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



Set the pixel write mask value for a RastPort

Documentation generated on: 2017-01-10