Struct Rectangle

    Definition

    Namespace:
    Tizen.Multimedia
    Assembly:
    Tizen.Multimedia.dll

    Represents the location of the object bounded by a rectangle defined by coordinates of top left corner, width and height.

    public struct Rectangle

    Constructors

    View Source

    Rectangle(int, int, int, int)

    Initializes a new instance of the Rectangle with the specified values.

    Declaration
    public Rectangle(int x, int y, int width, int height)
    Parameters
    Type Name Description
    int x

    The x-coordinate of the upper-left corner of the rectangle.

    int y

    The y-coordinate of the upper-left corner of the rectangle.

    int width

    The Width of the rectangle.

    int height

    The Height of the rectangle.

    View Source

    Rectangle(Point, Size)

    Initializes a new instance of the Rectangle with the specified values.

    Declaration
    public Rectangle(Point location, Size size)
    Parameters
    Type Name Description
    Point location

    A Location that represents the upper-left corner of the rectangular region.

    Size size

    A Size that represents the width and height of the rectangular region.

    Properties

    View Source

    Bottom

    Gets the y-coordinate of the bottom edge of the rectangle.

    Declaration
    public int Bottom { get; }
    Property Value
    Type Description
    int
    View Source

    Height

    Gets or sets the height of the rectangle.

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    int
    View Source

    Left

    Gets the x-coordinate of the left edge of the rectangle.

    Declaration
    public int Left { get; }
    Property Value
    Type Description
    int
    View Source

    Location

    Gets or sets the coordinates of the upper-left corner of the rectangle.

    Declaration
    public Point Location { get; set; }
    Property Value
    Type Description
    Point
    View Source

    Right

    Gets the x-coordinate of the right edge of the rectangle.

    Declaration
    public int Right { get; }
    Property Value
    Type Description
    int
    View Source

    Size

    Gets or sets the size of the rectangle.

    Declaration
    public Size Size { get; set; }
    Property Value
    Type Description
    Size
    View Source

    Top

    Gets the y-coordinate of the top edge of the rectangle.

    Declaration
    public int Top { get; }
    Property Value
    Type Description
    int
    View Source

    Width

    Gets or sets the width of the rectangle.

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    int
    View Source

    X

    Gets or sets the x-coordinate of the upper-left corner of the rectangle.

    Declaration
    public int X { get; set; }
    Property Value
    Type Description
    int
    View Source

    Y

    Gets or sets the y-coordinate of the upper-left corner of the rectangle.

    Declaration
    public int Y { get; set; }
    Property Value
    Type Description
    int

    Methods

    View Source

    Equals(object)

    Compares an object to an instance of Rectangle for equality.

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

    A object to compare.

    Returns
    Type Description
    bool

    true if the rectangles are equal; otherwise, false.

    Overrides
    System.ValueType.Equals(object)
    View Source

    GetHashCode()

    Gets the hash code for this instance of Rectangle.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code for this instance of Rectangle.

    Overrides
    System.ValueType.GetHashCode()
    View Source

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    System.ValueType.ToString()

    Operators

    View Source

    operator ==(Rectangle, Rectangle)

    Compares two instances of Rectangle for equality.

    Declaration
    public static bool operator ==(Rectangle rect1, Rectangle rect2)
    Parameters
    Type Name Description
    Rectangle rect1

    A Rectangle to compare.

    Rectangle rect2

    A Rectangle to compare.

    Returns
    Type Description
    bool

    true if the two instances of Rectangle are equal; otherwise false.

    View Source

    operator !=(Rectangle, Rectangle)

    Compares two instances of Rectangle for inequality.

    Declaration
    public static bool operator !=(Rectangle rect1, Rectangle rect2)
    Parameters
    Type Name Description
    Rectangle rect1

    A Rectangle to compare.

    Rectangle rect2

    A Rectangle to compare.

    Returns
    Type Description
    bool

    true if the two instances of Rectangle are not equal; otherwise false.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX