Table of Contents

Class FixedResolutionInterceptor

Namespace
SimulationFramework
Assembly
SimulationFramework.dll

Provides the functionality to SetFixedResolution(int, int, Color, bool, bool, bool) via a component.

public sealed class FixedResolutionInterceptor : ISimulationComponent, IDisposable
Inheritance
FixedResolutionInterceptor
Implements
Inherited Members

Constructors

FixedResolutionInterceptor(int, int, Color, bool, bool, bool)

Creates a new instance of the FixedResolutionInterceptor class.

public FixedResolutionInterceptor(int width, int height, Color backgroundColor, bool transparent, bool subpixelInput, bool stretchToFit)

Parameters

width int
height int
backgroundColor Color
transparent bool
subpixelInput bool
stretchToFit bool

Properties

BackgroundColor

The color to fill the window area not covered by the texture.

public Color BackgroundColor { get; set; }

Property Value

Color

FrameBuffer

The off-screen texture.

public ITexture FrameBuffer { get; }

Property Value

ITexture

Height

The height of the off-screen texture.

public int Height { get; }

Property Value

int

StretchToFit

Whether the off-screen texture should be stretched to fit the window.

public bool StretchToFit { get; set; }

Property Value

bool

SubpixelInput

Whether resolution dependent input values (such as Position) should report values more precise than one pixel (when possible).

public bool SubpixelInput { get; set; }

Property Value

bool

Transparent

Whether the framebuffer should be rendered to the window with transparency.

public bool Transparent { get; set; }

Property Value

bool

Width

The width of the off-screen texture.

public int Width { get; }

Property Value

int

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Initialize(MessageDispatcher)

Initializes the component. This is called once after the component is added to a simulation.

public void Initialize(MessageDispatcher dispatcher)

Parameters

dispatcher MessageDispatcher

The simulation's MessageDispatcher. This can be used to listen for messages to be called back at a later frame.

Resize(int, int)

Resizes the off-screen texture.

public void Resize(int width, int height)

Parameters

width int

The new width of the texture.

height int

The new height of the texture.