Class ControlHostRenderStep
Draws a ControlHost.
Inherited Members
Namespace: SadConsole.Renderers
Assembly: SadConsole.Host.MonoGame.dll
Syntax
public class ControlHostRenderStep : IRenderStep, IDisposable, IRenderStepTexture
Constructors
ControlHostRenderStep()
Declaration
public ControlHostRenderStep()
Properties
BackingTexture
The cached texture of the drawn surface.
Declaration
public RenderTarget2D BackingTexture { get; }
Property Value
Type | Description |
---|---|
RenderTarget2D |
CachedTexture
The texture created by the render step.
Declaration
public ITexture CachedTexture { get; }
Property Value
Type | Description |
---|---|
ITexture |
Name
The name of the render step.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
SortOrder
Indicates priority related to other steps. Lowest runs first.
Declaration
public uint SortOrder { get; set; }
Property Value
Type | Description |
---|---|
uint |
Methods
Composing(IRenderer, IScreenSurface)
Called when the renderer needs to redraw the Output texture.
Declaration
public void Composing(IRenderer renderer, IScreenSurface screenObject)
Parameters
Type | Name | Description |
---|---|---|
IRenderer | renderer | The renderer the render step is using. |
IScreenSurface | screenObject | The surface associated with the renderer. This may be null. |
Dispose()
Declaration
public void Dispose()
Dispose(bool)
Disposes the object.
Declaration
protected void Dispose(bool disposing)
Parameters
~ControlHostRenderStep()
Finalizes the object for collection.
Declaration
protected ~ControlHostRenderStep()
ProcessContainer(IContainer, ScreenSurfaceRenderer, IScreenSurface)
Processes a container from the control host.
Declaration
protected void ProcessContainer(IContainer container, ScreenSurfaceRenderer renderer, IScreenSurface screenObject)
Parameters
Type | Name | Description |
---|---|---|
IContainer | container | The container. |
ScreenSurfaceRenderer | renderer | The renderer used with this step. |
IScreenSurface | screenObject | The screen surface with font information. |
Refresh(IRenderer, IScreenSurface, bool, bool)
Called to redraw the render step if needed.
Declaration
public bool Refresh(IRenderer renderer, IScreenSurface screenObject, bool backingTextureChanged, bool isForced)
Parameters
Type | Name | Description |
---|---|---|
IRenderer | renderer | The renderer the render step is using. |
IScreenSurface | screenObject | The surface associated with the renderer. This may be null. |
bool | backingTextureChanged | |
bool | isForced |
Returns
Type | Description |
---|---|
bool | true when the step is going to draw something new and is requesting a Composing(IRenderer, IScreenSurface) step; otherwise false. |
Render(IRenderer, IScreenSurface)
Called when building draw calls for the render pipeline.
Declaration
public void Render(IRenderer renderer, IScreenSurface screenObject)
Parameters
Type | Name | Description |
---|---|---|
IRenderer | renderer | The renderer the render step is using. |
IScreenSurface | screenObject | The surface associated with the renderer. This may be null. |
RenderControlCells(ControlBase, ScreenSurfaceRenderer, IFont, Point, Rectangle)
Renders the cells of a control.
Declaration
protected void RenderControlCells(ControlBase control, ScreenSurfaceRenderer renderer, IFont font, Point fontSize, Rectangle parentViewRect)
Parameters
Type | Name | Description |
---|---|---|
ControlBase | control | The control. |
ScreenSurfaceRenderer | renderer | The renderer used with this step. |
IFont | font | The font to render the cells with. |
Point | fontSize | The size of a cell in pixels. |
Rectangle | parentViewRect | The view of the parent to cull cells from. |
Reset()
Called when the step should reset any state or texture information.
Declaration
public void Reset()
SetData(object)
Sets the ControlHost.
Declaration
public void SetData(object data)
Parameters
Type | Name | Description |
---|---|---|
object | data | A ControlHost object. |