Gorgon
Show / Hide Table of Contents

Interface IToolRenderer

Defines a rendering interface for rendering content in content editor plug in views.

Inherited Members
IGorgonNamedObject.Name
IDisposable.Dispose()
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 Source

BackgroundColor

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
DefaultContentRenderer<T>
| Edit this page View Source

ClientSize

Property to return the size of the view client area.

Declaration
Size2 ClientSize { get; }
Property Value
Type Description
Size2
See Also
DefaultContentRenderer<T>
| Edit this page View Source

IsEnabled

Property to set or return whether the renderer is enabled.

Declaration
bool IsEnabled { get; set; }
Property Value
Type Description
bool
See Also
DefaultContentRenderer<T>

Methods

| Edit this page View Source

LoadResources()

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
DefaultContentRenderer<T>
| Edit this page View Source

Render()

Function to render the content.

Declaration
void Render()
Remarks

This method is called by the view to render the content.

See Also
DefaultContentRenderer<T>
| Edit this page View Source

UnloadResources()

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.

See Also
DefaultContentRenderer<T>

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)

See Also

DefaultContentRenderer<T>
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author