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
Properties
BackgroundColor
The color to fill the window area not covered by the texture.
public Color BackgroundColor { get; set; }
Property Value
FrameBuffer
The off-screen texture.
public ITexture FrameBuffer { get; }
Property Value
Height
The height of the off-screen texture.
public int Height { get; }
Property Value
StretchToFit
Whether the off-screen texture should be stretched to fit the window.
public bool StretchToFit { get; set; }
Property Value
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
Transparent
Whether the framebuffer should be rendered to the window with transparency.
public bool Transparent { get; set; }
Property Value
Width
The width of the off-screen texture.
public int Width { get; }
Property Value
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
MessageDispatcherThe 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)