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

    Interface ITextEffectContext

    The services a running text effect needs from whatever is hosting it: somewhere to write, a glyph cache to stamp with, and pooled scratch storage.

    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    public interface ITextEffectContext
    Remarks

    TextModeEffectPlayer is the implementation used in a live scene. The interface exists so effects can also be driven by a test double that wraps a bare CellGrid, which is what keeps every effect unit-testable without a view, a camera or a GPU.

    Anything rented from a context must be returned to the same context. Effects do that in their release path, so game code never handles rentals directly.

    Properties

    CellAspect

    Gets the width of a cell divided by its height, which effects use to keep radial and diagonal shapes from coming out stretched. Cells are typically about twice as tall as they are wide, so this is usually around 0.5.

    Declaration
    float CellAspect { get; }
    Property Value
    Type Description
    float

    Console

    Gets the high-level writer over Grid, for effects that print text rather than stamping individual cells.

    Declaration
    TextModeConsole Console { get; }
    Property Value
    Type Description
    TextModeConsole

    GlyphCache

    Gets the glyph cache used to stamp codepoints an effect introduces itself. Effects that only move or recolor existing cells do not need it.

    Declaration
    GlyphAtlasCache GlyphCache { get; }
    Property Value
    Type Description
    GlyphAtlasCache

    Grid

    Gets the grid effects write into. Never null while an effect is bound.

    Declaration
    CellGrid Grid { get; }
    Property Value
    Type Description
    CellGrid

    Methods

    RentBuffer()

    Rents a cell buffer for the duration of an effect.

    Declaration
    CellBuffer RentBuffer()
    Returns
    Type Description
    CellBuffer

    A buffer holding nothing, ready to be resized and captured into.

    RentThresholds(int)

    Rents a float array of at least the requested length, for per-cell threshold values.

    Declaration
    float[] RentThresholds(int minimumLength)
    Parameters
    Type Name Description
    int minimumLength

    Smallest acceptable array length.

    Returns
    Type Description
    float[]

    An array of at least minimumLength entries.

    Remarks

    The array may be longer than requested and its contents are undefined, so fill every entry that will be read before reading any of them.

    ReturnBuffer(CellBuffer)

    Returns a previously rented cell buffer.

    Declaration
    void ReturnBuffer(CellBuffer buffer)
    Parameters
    Type Name Description
    CellBuffer buffer

    The buffer to return. Null is ignored.

    ReturnThresholds(float[])

    Returns a previously rented threshold array.

    Declaration
    void ReturnThresholds(float[] thresholds)
    Parameters
    Type Name Description
    float[] thresholds

    The array to return. Null is ignored.

    TryRenderScratch(Action<TextModeConsole>, in CellRect, CellBuffer)

    Draws something onto a scratch grid and captures a region of the result, without disturbing what is currently on screen.

    Declaration
    bool TryRenderScratch(Action<TextModeConsole> draw, in CellRect region, CellBuffer destination)
    Parameters
    Type Name Description
    Action<TextModeConsole> draw

    Callback that draws the target state.

    CellRect region

    The block of cells to capture from the result.

    CellBuffer destination

    Buffer to capture into.

    Returns
    Type Description
    bool

    True if the target was drawn and captured.

    Remarks

    This is how a transition gets hold of the screen it is transitioning to. The callback is handed a console over a spare grid the same size as the live one and writes to it exactly as it would to the real thing, in full-grid coordinates, so game code that draws a screen needs no special version for transitions.

    The scratch grid is cleared before the callback runs and is reused between calls, so nothing survives from one transition to the next.

    In this article
    Back to top Scylla Framework - TextMode Module API Documentation