Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Struct CellPosition

    Represents a position in a text mode grid as a (row, column) coordinate pair. Uses row-first ordering for linear document order comparison.

    Implements
    IEquatable<CellPosition>
    IComparable<CellPosition>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    public readonly struct CellPosition : IEquatable<CellPosition>, IComparable<CellPosition>

    Constructors

    CellPosition(int, int)

    Creates a new cell position.

    Declaration
    public CellPosition(int row, int column)
    Parameters
    Type Name Description
    int row

    Row index (0-based).

    int column

    Column index (0-based).

    Fields

    Column

    Column index (0-based, left to right).

    Declaration
    public readonly int Column
    Field Value
    Type Description
    int

    Invalid

    Sentinel value representing an invalid or unset position (-1, -1).

    Declaration
    public static readonly CellPosition Invalid
    Field Value
    Type Description
    CellPosition

    Row

    Row index (0-based, top to bottom).

    Declaration
    public readonly int Row
    Field Value
    Type Description
    int

    Properties

    IsValid

    Gets whether this position is the Invalid sentinel.

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    Methods

    CompareTo(CellPosition)

    Compares this position to another in document order (row-first, then column).

    Declaration
    public int CompareTo(CellPosition other)
    Parameters
    Type Name Description
    CellPosition other

    The other position to compare to.

    Returns
    Type Description
    int

    Negative if this comes before other, zero if equal, positive if this comes after.

    Equals(CellPosition)

    Determines whether this position equals another position.

    Declaration
    public bool Equals(CellPosition other)
    Parameters
    Type Name Description
    CellPosition other

    The other position.

    Returns
    Type Description
    bool

    True if row and column are equal.

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    FromFlatIndex(int, int)

    Creates a cell position from a flat row-major index.

    Declaration
    public static CellPosition FromFlatIndex(int index, int columns)
    Parameters
    Type Name Description
    int index

    Flat array index.

    int columns

    Number of columns in the grid. Must be greater than zero.

    Returns
    Type Description
    CellPosition

    The corresponding cell position, or Invalid if columns is not positive.

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToFlatIndex(int)

    Converts this position to a flat array index for a grid with the specified column count.

    Declaration
    public int ToFlatIndex(int columns)
    Parameters
    Type Name Description
    int columns

    Number of columns in the grid. Must be greater than zero.

    Returns
    Type Description
    int

    Flat row-major index, or 0 if columns is not positive.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator ==(CellPosition, CellPosition)

    Equality operator.

    Declaration
    public static bool operator ==(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    operator >(CellPosition, CellPosition)

    Greater-than operator (document order).

    Declaration
    public static bool operator >(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    operator >=(CellPosition, CellPosition)

    Greater-than-or-equal operator (document order).

    Declaration
    public static bool operator >=(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    operator !=(CellPosition, CellPosition)

    Inequality operator.

    Declaration
    public static bool operator !=(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    operator <(CellPosition, CellPosition)

    Less-than operator (document order).

    Declaration
    public static bool operator <(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    operator <=(CellPosition, CellPosition)

    Less-than-or-equal operator (document order).

    Declaration
    public static bool operator <=(CellPosition left, CellPosition right)
    Parameters
    Type Name Description
    CellPosition left
    CellPosition right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    IComparable<T>
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation