Table of Contents

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

from PluginPoint

Where the line starts.

to PluginPoint

Where the line ends.

color PluginColor

The line's colour.

thickness float

The line's thickness.

DrawText(string, PluginPoint, PluginTextStyle)

Draws one run of text.

void DrawText(string text, PluginPoint position, PluginTextStyle style)

Parameters

text string

The text to draw.

position PluginPoint

Where the text starts.

style PluginTextStyle

The font, size and colour.

DrawTexture(IPluginTexture, PluginRect, PluginColor)

Draws a texture stretched over a rectangle.

void DrawTexture(IPluginTexture texture, PluginRect destination, PluginColor color)

Parameters

texture IPluginTexture

A texture from LoadTexture(string).

destination PluginRect

The rectangle the texture fills.

color PluginColor

A 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()