Calculate the best ModeID with given parameters
Source position: agraphics.pas line 2272
function BestModeIDA( |
const tags: pTagItem |
):LongWord; |
tags |
|
A pointer to an array of TagItems. (BIDTAGS_*) |
ID of the best mode to use, or INVALID_ID if a match could not be found.
This function takes into account the Compatability of the Monitor being matched to, and the source ViewPort or ModeID. Incompatibilitys will cause a result of INVALID_ID.
BIDTAG_NominalWidth, BIDTAG_NominalHeight, BIDTAG_DesiredWidth, BIDTAG_DesiredHeight, must all be non-0.
The comparisons are made against the DimensionInfo->Nominal values. ie, this will not return a best fit against overscan dimensions.
Snippet
IFF Display Program with a HAM image, to be displayed in the same monitor type as the Workbench ViewPort.
ID := BestModeID([BIDTAG_NominalWidth, IFFImage^.Width, BIDTAG_NominalHeight, IFFImage^.Height, BIDTAG_Depth, IFFImage^.Depth, BIDTAG_DIPFMustHave, DIPF_IS_HAM, BIDTAG_MonitorID, (GetVPModeID(WbVP) and MONITOR_ID_MASK)]);
To make an interlace version of a ViewPort:
ID := BestModeID([BIDTAG_ViewPort, ThisViewPort, BIDTAG_MustHave, DIFP_IS_LACE]);
|
VarArgs version of BestModeIDA() |