Table of Contents

Class PluginCanvasDescriptor

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

How a plugin's canvas is identified, how large it is and where it sits. A canvas is exactly its declared size: everything painted is clipped to that rectangle, and there is no way to draw anywhere else on the screen.

public sealed record PluginCanvasDescriptor : IEquatable<PluginCanvasDescriptor>
Inheritance
PluginCanvasDescriptor
Implements
Inherited Members

Constructors

PluginCanvasDescriptor(string, int, int)

How a plugin's canvas is identified, how large it is and where it sits. A canvas is exactly its declared size: everything painted is clipped to that rectangle, and there is no way to draw anywhere else on the screen.

public PluginCanvasDescriptor(string CanvasId, int Width, int Height)

Parameters

CanvasId string

The plugin's own short name for this canvas, unique within the plugin.

Width int

The canvas's width in pixels, at least 1.

Height int

The canvas's height in pixels, at least 1.

Properties

AcceptsPointerInput

Whether the canvas takes pointer input. Off, the default, the canvas is click-through: presses, drags and the wheel over it go to the world and the windows beneath as if it were not there. On, the two are exclusive and input wins: while the canvas is shown and has a PointerHandler, everything the pointer does inside the canvas's rectangle goes to that handler and no further, and the world beneath gets no mouse there. Outside the rectangle nothing changes either way. On a host without a window the flag is kept and nothing is ever delivered.

public bool AcceptsPointerInput { get; init; }

Property Value

bool

Anchor

Which corner or edge of the screen the canvas is measured from.

public PluginCanvasAnchor Anchor { get; init; }

Property Value

PluginCanvasAnchor

CanvasId

The plugin's own short name for this canvas, unique within the plugin.

public string CanvasId { get; init; }

Property Value

string

Height

The canvas's height in pixels, at least 1.

public int Height { get; init; }

Property Value

int

Offset

How far from the anchor the canvas sits, in pixels; negative values move it back towards the screen's middle from a right or bottom anchor.

public PluginPoint Offset { get; init; }

Property Value

PluginPoint

StartVisible

Whether the canvas is shown as soon as it is registered.

public bool StartVisible { get; init; }

Property Value

bool

Width

The canvas's width in pixels, at least 1.

public int Width { get; init; }

Property Value

int