GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    TextSpacing Struct

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents inter-paragraph and inter-line spacing specified either in percentages of the text size or as an absolute value.

    • C#
    • VB.NET
    public struct TextSpacing : IEquatable<TextSpacing>
    Public Structure TextSpacing
        Implements IEquatable(Of TextSpacing)
    Implements
    System.IEquatable<TextSpacing>

    Fields

    Double

    Text spacing that is equivalent to 200% of the text size.

    • C#
    • VB.NET
    public static readonly TextSpacing Double
    Public Shared ReadOnly Double As TextSpacing
    Field Value
    TextSpacing

    None

    Text spacing is absent (zero).

    • C#
    • VB.NET
    public static readonly TextSpacing None
    Public Shared ReadOnly None As TextSpacing
    Field Value
    TextSpacing

    OnePointFiveLines

    Text spacing that is equivalent to 150% of the text size.

    • C#
    • VB.NET
    public static readonly TextSpacing OnePointFiveLines
    Public Shared ReadOnly OnePointFiveLines As TextSpacing
    Field Value
    TextSpacing

    Single

    Text spacing that is equivalent to 100% of the text size.

    • C#
    • VB.NET
    public static readonly TextSpacing Single
    Public Shared ReadOnly Single As TextSpacing
    Field Value
    TextSpacing

    Properties

    IsPercent

    Gets a value indicating whether this text spacing is specified in percentages.

    • C#
    • VB.NET
    public readonly bool IsPercent { get; }
    Public ReadOnly Property IsPercent As Boolean
    Property Value
    System.Boolean

    true if this text spacing is specified in percentages; otherwise, false.

    Percent

    Gets the text spacing percentage.

    • C#
    • VB.NET
    public readonly double Percent { get; }
    Public ReadOnly Property Percent As Double
    Property Value
    System.Double

    The text spacing percentage.

    Exceptions
    System.InvalidOperationException

    Text spacing is not specified in percentages.

    Value

    Gets the text spacing value.

    • C#
    • VB.NET
    public readonly Length Value { get; }
    Public ReadOnly Property Value As Length
    Property Value
    Length

    The text spacing value.

    Exceptions
    System.InvalidOperationException

    Text spacing is specified in percentages.

    Methods

    Equals(TextSpacing)

    Determines whether the other TextSpacing is equal to this TextSpacing instance.

    • C#
    • VB.NET
    public bool Equals(TextSpacing other)
    Public Function Equals(other As TextSpacing) As Boolean
    Parameters
    other
    TextSpacing

    The other text spacing to compare with this text spacing instance.

    Returns
    System.Boolean

    true if the other TextSpacing is equal to this TextSpacing instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this TextSpacing instance.

    • C#
    • VB.NET
    public override bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this text spacing instance.

    Returns
    System.Boolean

    true if the specified System.Object is a TextSpacing and is equal to this TextSpacing instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    Exactly(Length)

    Creates a text spacing instance from the specified absolute value.

    • C#
    • VB.NET
    public static TextSpacing Exactly(Length value)
    Public Shared Function Exactly(value As Length) As TextSpacing
    Parameters
    value
    Length

    The absolute value of the text spacing.

    Returns
    TextSpacing

    A text spacing instance that represents the specified absolute text spacing.

    Exceptions
    System.ArgumentOutOfRangeException

    Argument is not between 0 and 55.88 cm.

    GetHashCode()

    Returns a hash code for this TextSpacing instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this TextSpacing instance.

    Overrides
    System.ValueType.GetHashCode()

    Multiple(Double)

    Creates a text spacing instance from the specified percentage value.

    If percent parameter is equal to 1, then returned text spacing is equal to Single. If percent parameter is equal to 1.5, then returned text spacing is equal to OnePointFiveLines. If percent parameter is equal to 2, then returned text spacing is equal to Double.

    • C#
    • VB.NET
    public static TextSpacing Multiple(double percent)
    Public Shared Function Multiple(percent As Double) As TextSpacing
    Parameters
    percent
    System.Double

    The percentage value of the text spacing.

    Returns
    TextSpacing

    A text spacing instance that represents the specified percentage text spacing.

    Exceptions
    System.ArgumentOutOfRangeException

    Argument is not between 0 and 10 (exclusive).

    ToString()

    Returns a System.String that represents this TextSpacing instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this TextSpacing instance.

    Overrides
    System.ValueType.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Operators

    Equality(TextSpacing, TextSpacing)

    Determines whether first and second TextSpacings are equal.

    • C#
    • VB.NET
    public static bool operator ==(TextSpacing first, TextSpacing second)
    Public Shared Operator =(first As TextSpacing, second As TextSpacing) As Boolean
    Parameters
    first
    TextSpacing

    The first text spacing.

    second
    TextSpacing

    The second text spacing.

    Returns
    System.Boolean

    true if first and second text spacings are equal; otherwise, false.

    Inequality(TextSpacing, TextSpacing)

    Determines whether first and second TextSpacings are not equal.

    • C#
    • VB.NET
    public static bool operator !=(TextSpacing first, TextSpacing second)
    Public Shared Operator <>(first As TextSpacing, second As TextSpacing) As Boolean
    Parameters
    first
    TextSpacing

    The first text spacing.

    second
    TextSpacing

    The second text spacing.

    Returns
    System.Boolean

    true if first and second text spacings are not equal; otherwise, false.

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.