diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-12 15:06:17 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-12 15:06:17 +0100 |
| commit | 5784f8dca22600b25569ede999cdc795bc8bb8ef (patch) | |
| tree | 3b4a37f840c513b44902ec6c4a5485d9edd9b577 /Backends/VkvgBackend/src/TextExtents.cs | |
| parent | c18fc4cc77a62dda69a4335f5cd51f53ae802995 (diff) | |
vkvg.net for vkvg backend
Diffstat (limited to 'Backends/VkvgBackend/src/TextExtents.cs')
| -rw-r--r-- | Backends/VkvgBackend/src/TextExtents.cs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/Backends/VkvgBackend/src/TextExtents.cs b/Backends/VkvgBackend/src/TextExtents.cs deleted file mode 100644 index 8afb7392..00000000 --- a/Backends/VkvgBackend/src/TextExtents.cs +++ /dev/null @@ -1,60 +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 TextExtents : IEquatable<TextExtents> - { - float xBearing; - float yBearing; - float width; - float height; - float xAdvance; - float yAdvance; - - public float XBearing { - get => xBearing; - set { xBearing = value; } - } - - public float YBearing { - get => yBearing; - set { yBearing = value; } - } - - public float Width { - get => width; - set { width = value; } - } - - public float Height { - get => height; - set { height = value; } - } - - public float XAdvance { - get => xAdvance; - set { xAdvance = value; } - } - - public float YAdvance { - get => yAdvance; - set { yAdvance = value; } - } - - public override int GetHashCode () => - HashCode.Combine (xBearing, yBearing, width, height, xAdvance, yAdvance); - public override bool Equals (object obj) => obj is TextExtents te ? Equals (te) : false; - - public bool Equals(TextExtents other) => - xBearing == other.xBearing && yBearing == other.yBearing && width == other.width && height == other.height && - xAdvance == other.xAdvance && yAdvance == other.yAdvance; - public static bool operator == (TextExtents extents, TextExtents other) => extents.Equals (other); - public static bool operator != (TextExtents extents, TextExtents other )=> !extents.Equals (other); - } -} |