using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.Annotation;
///
/// Text class for representation in the viewer
///
[SpeckleType("Objects.Annotation.Text")]
public class Text : Base
{
///
/// Plain text, without formatting
///
public required string value { get; set; }
///
/// Height in linear units or pixels (if Units.None)
///
public required double height { get; set; }
///
/// Units will be 'Units.None' if the text size is defined in pixels (stays the same size
/// independently of zooming the model). Default height in pixels is 17px (used for Viewer measurements)
///
public required string units { get; set; }
///
/// If true, the text is oriented to face the screen (camera-aligned).
///
public required bool screenOriented { get; set; }
///
/// Horizontal alignment: Left, Center or Right
///
public AlignmentHorizontal alignmentH { get; set; }
///
/// Vertical alignment: Top, Center or Bottom
///
public AlignmentVertical alignmentV { get; set; }
///
/// Plane axis vectors will be ignored if screenOriented is true
///
public required Plane plane { get; set; }
///
/// Maximum width of the text field (in 'units').
/// Text will be split into lines (wrapped) to fit into the width.
/// null, if text should not be wrapped.
///
public double? maxWidth { get; set; }
}
public enum AlignmentHorizontal
{
Left,
Center,
Right,
}
public enum AlignmentVertical
{
Top,
Center,
Bottom,
}