System.Drawing.Size

Summary


Stores an ordered pair of integers, typically the width and height of a rectangle.
Defined in Size.js

Constructors

System.Drawing.Size(<Int> width, <Int> height)
Initializes a new instance of the Size class from the specified dimensions.

Parameters

  • width - The width component of the new Size.
  • height - The height component of the new Size.

Properties

  • Int Height
    Gets or sets the vertical component of this Size.
  • Int Width
    Gets or sets the horizontal component of this Size.
  • static final Size Empty
    Represents a Size that has width and height values set to zero.

Methods

  • Object Clone()
    Creates a new instance of a Size with the same values as this Size.
  • Boolean Equals(<Object> obj)
    Tests to see whether the specified object is a Size with the same dimensions as this Size.

    Parameters

    • obj - The Object to test.

    Return Values

    True if obj is a Size and has the same width and height as this Size; otherwise, false.
  • Boolean IsEmpty()
    Tests whether this Size has width and height of 0.

    Return Values

    True when this Size has both a width and height of 0; otherwise, false.
  • String ToString()
    Creates a human-readable string that represents this Size.

    Return Values

    A human-readable string that represents this Size.
  • static Size Add(<Size> sz1, <Size> sz2)
    Adds the width and height of one Size to the width and height of another Size. The Add adds the Width and Height of the specified Size to the X and Y values of the specified point.

    Parameters

    • sz1 - The first Size to add.
    • sz2 - The second Size to add.

    Return Values

    A Size that is the result of the addition operation.
  • static Size Subtract(<Size> sz1, <Size> sz2)
    Subtracts the width and height of one Size structure from the width and height of another Size structure.

    Parameters

    • sz1 - The Size on the right side of the subtraction operator.
    • sz2 - The Size on the left side of the subtraction operator.

    Return Values

    The Size that is a result of the subtraction operation.