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

    Show / Hide Table of Contents

    PdfSize Struct

    Namespace:
    GemBox.Pdf.Content
    Assembly:
    GemBox.Pdf.dll

    Represents the size of an object.

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

    Constructors

    PdfSize(Double, Double)

    Initializes a new instance of the PdfSize structure that contains the specified width and height.

    • C#
    • VB.NET
    public PdfSize(double width, double height)
    Public Sub New(width As Double, height As Double)
    Parameters
    width
    System.Double

    The width of the new PdfSize structure.

    height
    System.Double

    The height of the new PdfSize structure.

    Exceptions
    System.ArgumentException

    width or height is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    System.ArgumentOutOfRangeException

    width or height is less than zero.

    Properties

    Height

    Gets the height.

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

    The height.

    Width

    Gets the width.

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

    The width.

    Methods

    Equals(PdfSize)

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

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

    The other size to compare with this size instance.

    Returns
    System.Boolean

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

    Equals(Object)

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

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

    The System.Object to compare with this size instance.

    Returns
    System.Boolean

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

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfSize instance.

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

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

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfSize instance.

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

    A System.String that represents this PdfSize 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(PdfSize, PdfSize)

    Determines whether first and second PdfSizes are equal.

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

    The first size.

    second
    PdfSize

    The second size.

    Returns
    System.Boolean

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

    Inequality(PdfSize, PdfSize)

    Determines whether first and second PdfSizes are not equal.

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

    The first size.

    second
    PdfSize

    The second size.

    Returns
    System.Boolean

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

    Implements

    System.IEquatable<T>
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.