// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.Fonts.Tables.AdvancedTypographic.Variations;
namespace SixLabors.Fonts.Tables.General.Colr {
///
/// Represents a COLR v1 ClipBox format 1 subtable with static (non-variable) int16 bounding box edges.
///
///
internal sealed class ClipBoxFormat1 : ClipBox
{
///
/// The minimum x-coordinate of the clip box.
///
private readonly short xMin;
///
/// The minimum y-coordinate of the clip box.
///
private readonly short yMin;
///
/// The maximum x-coordinate of the clip box.
///
private readonly short xMax;
///
/// The maximum y-coordinate of the clip box.
///
private readonly short yMax;
///
/// Initializes a new instance of the class.
///
/// The minimum x-coordinate.
/// The minimum y-coordinate.
/// The maximum x-coordinate.
/// The maximum y-coordinate.
public ClipBoxFormat1(short xMin, short yMin, short xMax, short yMax)
{
this.xMin = xMin;
this.yMin = yMin;
this.xMax = xMax;
this.yMax = yMax;
}
///
public override Bounds GetBounds(ColrTable colr, GlyphVariationProcessor? processor)
=> new(this.xMin, this.yMin, this.xMax, this.yMax);
}
}