Struct Rectangle

    Definition

    Namespace:
    Tizen.Content.MediaContent
    Assembly:
    Tizen.Content.MediaContent.dll

    Represents the location of the object bounded by the 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.

    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

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

    View Source

    Height

    Gets or sets the height of the rectangle.

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

    The height of the rectangle.

    View Source

    Left

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

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

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

    View Source

    Right

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

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

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

    View Source

    Top

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

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

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

    View Source

    Width

    Gets or sets the width of the rectangle.

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

    The width of the rectangle.

    View Source

    X

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

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

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

    View Source

    Y

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

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

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

    Methods

    View Source

    Equals(object)

    Tests whether object is a rectangle structure with the same location and size of this rectangle structure.

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

    The object to compare.

    Returns
    Type Description
    bool

    true if object is a rectangle structure and its x, y, width, and height properties are equal to the corresponding properties of this rectangle structure; otherwise, false.

    Overrides
    System.ValueType.Equals(object)
    View Source

    GetHashCode()

    Returns the hash code for this rectangle structure.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    An integer that represents the hash code for this rectangle.

    Overrides
    System.ValueType.GetHashCode()
    View Source

    ToString()

    Returns a string representation of the rectangle.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the current rectangle.

    Overrides
    System.ValueType.ToString()

    Operators

    View Source

    operator ==(Rectangle, Rectangle)

    Tests whether two rectangle structures have equal location and size.

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

    The Rectangle to compare.

    Rectangle rect2

    The Rectangle to compare.

    Returns
    Type Description
    bool

    true if the two rectangle structures have equal x, y, width, and height properties; otherwise, false.

    View Source

    operator !=(Rectangle, Rectangle)

    Tests whether two rectangle structures differ in location or size.

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

    The Rectangle to compare.

    Rectangle rect2

    The Rectangle to compare.

    Returns
    Type Description
    bool

    true if any of the x, y, width, or height properties of the two rectangle structures are unequal; otherwise false.

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