diff options
Diffstat (limited to 'Backends/VkvgBackend/src/FontExtents.cs')
| -rw-r--r-- | Backends/VkvgBackend/src/FontExtents.cs | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Backends/VkvgBackend/src/FontExtents.cs b/Backends/VkvgBackend/src/FontExtents.cs deleted file mode 100644 index f5614c2f..00000000 --- a/Backends/VkvgBackend/src/FontExtents.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2018-2022 Jean-Philippe Bruyère <jp_bruyere@hotmail.com> -// -// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) -using System; -using System.Runtime.InteropServices; - -namespace Crow.VkvgBackend -{ - [StructLayout (LayoutKind.Sequential)] - internal struct FontExtents : IEquatable<FontExtents> - { - float ascent; - float descent; - float height; - float maxXAdvance; - float maxYAdvance; - - public float Ascent { - get => ascent; - set { ascent = value; } - } - - public float Descent { - get => descent; - set { descent = value; } - } - - public float Height { - get => height; - set { height = value; } - } - - public float MaxXAdvance { - get => maxXAdvance; - set { maxXAdvance = value; } - } - - public float MaxYAdvance { - get => maxYAdvance; - set { maxYAdvance = value; } - } - - public FontExtents (float ascent, float descent, float height, float maxXAdvance, float maxYAdvance) - { - this.ascent = ascent; - this.descent = descent; - this.height = height; - this.maxXAdvance = maxXAdvance; - this.maxYAdvance = maxYAdvance; - } - - public override int GetHashCode () => HashCode.Combine (ascent, descent, height, maxXAdvance, maxYAdvance); - public override bool Equals (object obj) => obj is FontExtents fe ? Equals (fe) : false; - - public bool Equals(FontExtents other) => - ascent == other.ascent && descent == other.descent && height == other.height && - maxXAdvance == other.maxXAdvance && maxYAdvance == other.maxYAdvance; - - public static bool operator == (FontExtents extents, FontExtents other) => extents.Equals (other); - public static bool operator != (FontExtents extents, FontExtents other) => !extents.Equals (other); - } -} |