Class GorgonCollectionExtensions
Extension methods for collections.
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public static class GorgonCollectionExtensions
Methods
| Edit this page View SourceFindNearestVideoMode(IReadOnlyList<GorgonVideoMode>, IGorgonVideoOutputInfo, in GorgonVideoMode, out GorgonVideoMode)
Function to find a display mode supported by the Gorgon.
Declaration
public static void FindNearestVideoMode(this IReadOnlyList<GorgonVideoMode> videoModes, IGorgonVideoOutputInfo output, in GorgonVideoMode videoMode, out GorgonVideoMode suggestedMode)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<GorgonVideoMode> | videoModes | The list of video modes to evaluate. |
IGorgonVideoOutputInfo | output | The output to use when looking for a video mode. |
GorgonVideoMode | videoMode | The GorgonVideoMode used to find the closest match. |
GorgonVideoMode | suggestedMode | A GorgonVideoMode that is the nearest match for the provided video mode. |
Remarks
Users may leave the GorgonVideoMode values at unspecified (either 0, or default enumeration values) to indicate that these values should not be used in the search.
The following members in GorgonVideoMode may be skipped (if not listed, then this member must be specified):
- Width and Height. Both values must be set to 0 if not filtering by width or height.
- RefreshRate should be set to empty in order to skip filtering by refresh rate.
- Scaling should be set to Unspecified in order to skip filtering by the scaling mode.
- ScanlineOrder should be set to Unspecified in order to skip filtering by the scanline order.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |