Set maximum pen value for a rastport
Source position: agraphics.pas line 2139
procedure SetMaxPen( |
Rp: PRastPort; |
MaxPen: LongWord |
); |
Rp |
|
A pointer to a RastPort |
MaxPen |
|
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.
|
Set the pixel write mask value for a RastPort |