Skip to content
ChartForgeX
Struct

VisualCanvasPlacement

ChartForgeX.Composition

Namespace
ChartForgeX.Composition
Assembly
ChartForgeX.Visuals
Base
ValueType
Modifiers
sealed

Describes reusable anchor-based placement inside a canvas or another rectangular region.

Inheritance

  • ValueType
  • VisualCanvasPlacement

Usage

Explore 36 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Accepted by parameters 35

Constructors

public VisualCanvasPlacement(VisualCanvasAnchor anchor, double offsetX = 0, double offsetY = 0) #

Initializes an anchor placement.

Parameters

anchor ChartForgeX.Composition.VisualCanvasAnchor required
offsetX double = 0 optional
offsetY double = 0 optional

Methods

public static VisualCanvasPlacement At(VisualCanvasAnchor anchor, double offsetX = 0, double offsetY = 0) #

Creates an anchor placement.

Parameters

anchor ChartForgeX.Composition.VisualCanvasAnchor required
offsetX double = 0 optional
offsetY double = 0 optional
Resolve 2 overloads
public ChartRect Resolve(double containerWidth, double containerHeight, double width, double height) #

Resolves this placement inside a zero-origin container.

Parameters

containerWidth double required
containerHeight double required
width double required
height double required

Returns

ChartRect
public ChartRect Resolve(ChartRect container, double width, double height) #

Resolves this placement inside another rectangular region.

Parameters

container ChartForgeX.Primitives.ChartRect required
width double required
height double required

Returns

ChartRect

Properties

public VisualCanvasAnchor Anchor { get; } #

Gets the anchor used as the placement reference.

public double OffsetX { get; } #

Gets the horizontal offset. For right anchors, positive values inset from the right edge.

public double OffsetY { get; } #

Gets the vertical offset. For bottom anchors, positive values inset from the bottom edge.