// Copyright (c) Six Labors. // Licensed under the Six Labors Split License. using System.Numerics; namespace SixLabors.Fonts.Rendering { /// /// Canvas metadata describing the document-space coordinate system for a painted glyph. /// internal readonly struct PaintedCanvasMetadata { /// /// Initializes a new instance of the struct. /// /// The viewBox rectangle (minX, minY, width, height). /// True if the source coordinate system is y-down; false if y-up. /// An optional root transform in document-space. public PaintedCanvasMetadata(FontRectangle viewBox, bool isYDown, Matrix3x2 rootTransform) { this.HasViewBox = viewBox != FontRectangle.Empty; this.ViewBox = viewBox; this.IsYDown = isYDown; this.RootTransform = rootTransform; } /// /// Gets a value indicating whether a root viewBox is present. /// public bool HasViewBox { get; } /// /// Gets the viewBox. /// public FontRectangle ViewBox { get; } /// /// Gets a value indicating whether the source coordinate system is y-down. /// public bool IsYDown { get; } /// /// Gets the root transform in document-space. /// public Matrix3x2 RootTransform { get; } } }