Gorgon
Show / Hide Table of Contents

Class GorgonCollectionExtensions

Extension methods for collections.

Inheritance
object
GorgonCollectionExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public static class GorgonCollectionExtensions

Methods

| Edit this page View Source

FindNearestVideoMode(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.

important

The Format member must be one of the UNorm format types and cannot be set to Unknown.

Exceptions
Type Condition
ArgumentNullException

Thrown when the output parameter is null.

  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author