Gorgon
Show / Hide Table of Contents

Struct GorgonKerningPair

A kerning pair value.

Implements
IGorgonEquatableByRef<GorgonKerningPair>
IEquatable<GorgonKerningPair>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: Gorgon.Graphics.Fonts
Assembly: Gorgon.Graphics.Fonts.dll
Syntax
public readonly struct GorgonKerningPair : IGorgonEquatableByRef<GorgonKerningPair>, IEquatable<GorgonKerningPair>
Remarks

Kerning pairs are used to offset a pair of characters when they are next to each other.

Constructors

| Edit this page View Source

GorgonKerningPair(char, char)

Initializes a new instance of the GorgonKerningPair struct.

Declaration
public GorgonKerningPair(char leftChar, char rightChar)
Parameters
Type Name Description
char leftChar

The left char.

char rightChar

The right char.

Fields

| Edit this page View Source

LeftCharacter

Left character.

Declaration
public readonly char LeftCharacter
Field Value
Type Description
char
| Edit this page View Source

RightCharacter

Right character.

Declaration
public readonly char RightCharacter
Field Value
Type Description
char

Methods

| Edit this page View Source

Equals(GorgonKerningPair)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(GorgonKerningPair other)
Parameters
Type Name Description
GorgonKerningPair other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the parameter; otherwise, false.

| Edit this page View Source

Equals(in GorgonKerningPair)

Function to compare this instance with another.

Declaration
public bool Equals(in GorgonKerningPair other)
Parameters
Type Name Description
GorgonKerningPair other

The other instance to use for comparison.

Returns
Type Description
bool

true if equal, false if not.

| Edit this page View Source

Equals(in GorgonKerningPair, in GorgonKerningPair)

Function to determine if 2 kerning pairs are the same.

Declaration
public static bool Equals(in GorgonKerningPair left, in GorgonKerningPair right)
Parameters
Type Name Description
GorgonKerningPair left

Left kerning pair to compare.

GorgonKerningPair right

Right kerning pair to compare.

Returns
Type Description
bool

true if the same, false if not.

| Edit this page View Source

Equals(object)

Determines whether the specified object is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with this instance.

Returns
Type Description
bool

true if the specified object is equal to this instance; otherwise, false.

Overrides
ValueType.Equals(object)
| Edit this page View Source

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
ValueType.GetHashCode()
| Edit this page View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(in GorgonKerningPair, in GorgonKerningPair)

Implements the operator ==.

Declaration
public static bool operator ==(in GorgonKerningPair left, in GorgonKerningPair right)
Parameters
Type Name Description
GorgonKerningPair left

The left.

GorgonKerningPair right

The right.

Returns
Type Description
bool

The result of the operator.

| Edit this page View Source

operator !=(in GorgonKerningPair, in GorgonKerningPair)

Implements the operator !=.

Declaration
public static bool operator !=(in GorgonKerningPair left, in GorgonKerningPair right)
Parameters
Type Name Description
GorgonKerningPair left

The left.

GorgonKerningPair right

The right.

Returns
Type Description
bool

The result of the operator.

Implements

IGorgonEquatableByRef<T>
IEquatable<T>

Extension Methods

GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author