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

CoerceMode

Calculate ViewPort mode coercion

Declaration

Source position: agraphics.pas line 2293

function CoerceMode(

  vp: pViewPort;

  monitorid: LongWord;

  flags: LongWord

):LongWord;

Arguments

monitorid

  

Monitor number to coerce to (i.e. a mode masked with MONITOR_ID_MASK)

flags

  

PRESERVE_COLORS = keep the number of bitplanes in the ViewPort AVOID_FLICKER = do not coerce to an interlace mode

Function result

ID of best mode to coerce to, or INVALID_ID if could not coerce

Description

To determine the best mode in the MonitorID to coerce RealViewPort to, given the restrictions set in Flags.

This function takes into account the compatibility of the Monitor being coerced to, and the ViewPort that is being coerced. Incompatibilities will cause a result of INVALID_ID.

Snippet

newmode := CoerceMode(vp, VGA_MONITOR_ID, PRESERVE_COLORS);

Errors

This function is unimplemented.


Documentation generated on: 2021-07-30