Interface IPluginRenderSurface
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
Commands emitted during one host-owned HUD frame.
public interface IPluginRenderSurface
Methods
BeginFrame()
Starts a frame. Whatever was drawn in the frame before is discarded.
void BeginFrame()
DrawLine(PluginPoint, PluginPoint, PluginColor, float)
Draws a straight line.
void DrawLine(PluginPoint from, PluginPoint to, PluginColor color, float thickness)
Parameters
fromPluginPointWhere the line starts.
toPluginPointWhere the line ends.
colorPluginColorThe line's colour.
thicknessfloatThe line's thickness.
DrawText(string, PluginPoint, PluginTextStyle)
Draws one run of text.
void DrawText(string text, PluginPoint position, PluginTextStyle style)
Parameters
textstringThe text to draw.
positionPluginPointWhere the text starts.
stylePluginTextStyleThe font, size and colour.
DrawTexture(IPluginTexture, PluginRect, PluginColor)
Draws a texture stretched over a rectangle.
void DrawTexture(IPluginTexture texture, PluginRect destination, PluginColor color)
Parameters
textureIPluginTextureA texture from LoadTexture(string).
destinationPluginRectThe rectangle the texture fills.
colorPluginColorA colour the texture is multiplied by; opaque white leaves it unchanged.
EndFrame()
Ends the frame and hands what was drawn to the host to show.
void EndFrame()