Interface IToolRenderer
Defines a rendering interface for rendering content in content editor plug in views.
Namespace: Gorgon.Editor.Rendering
Assembly: Gorgon.Editor.API.dll
Syntax
public interface IToolRenderer : IGorgonNamedObject, IDisposable
Remarks
See the DefaultContentRenderer<T> class for more information on a base rendering class that developers can inherit in order to implement their own renderer(s).
Properties
| Edit this page View SourceBackgroundColor
Property to set or return the color to use when clearing the swap chain.
Declaration
GorgonColor BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
GorgonColor |
Remarks
This value defaults to the background color of the view.
See Also
| Edit this page View SourceClientSize
Property to return the size of the view client area.
Declaration
Size2 ClientSize { get; }
Property Value
Type | Description |
---|---|
Size2 |
See Also
| Edit this page View SourceIsEnabled
Property to set or return whether the renderer is enabled.
Declaration
bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
Methods
| Edit this page View SourceLoadResources()
Function to load resources for the renderer.
Declaration
void LoadResources()
Remarks
This method is used to load any required temporary resources for the renderer prior to rendering content. This must be paired with a call to UnloadResources() when the renderer is no longer in use to ensure efficient memory usage.
See Also
| Edit this page View SourceRender()
Function to render the content.
Declaration
void Render()
Remarks
This method is called by the view to render the content.
See Also
| Edit this page View SourceUnloadResources()
Function to unload resources from the renderer.
Declaration
void UnloadResources()
Remarks
This method is used to unload temporary resources for the renderer when it is no longer needed. Failure to call this may result in memory leakage.