Loading navigation

Atlas

Your web-based eye in the sky

Road maps, satellite views, directions, GPS tracking, and more! Atlas is the easiest way to find what you're looking for.

Open

Ready to get started?

Open Atlas now.
Details

Want more information?

Read more about Atlas.

Bugs

Bug tracking made stupid easy

More advanced than Post-it notes, less complicated than Team System. We've stripped the bloat from traditional bug tracking systems and dramatically simplified the whole mess.

Open

Ready to get started?

Open Bugs now.
Details

Want more information?

Read more about Bugs?

Folders

Your files, on the internets

Store your digital photos, music, movies and documents online. Work with files in your web browser like you would on your desktop.

Open

Ready to get started?

Open Folders now.
Details

Want more information?

Read more about Folders.

Gadgets

Mini-applications for Windows Live

Gadgets customize your Windows Live homepage, putting you in charge of what information you'd like to interact with.

Open

Ready to get started?

Add all of our gadgets to your Live.com page.
Details

Want more information?

Read more about the gadgets we've created for Live.com.

Scripts

JavaScript Framework designed for .NET gurus

Built for software developers, Scripts is an object oriented JavaScript framework with a programming model similar to the Microsoft .NET Framework.

Open

Ready to get started?

Open the examples and browse through the documentation.
Details

Want more information?

Read more about Scripts.

FreshLogicStudios.Scripts.Drawing.Rectangle

Summary


Stores a set of four integers that represent the location and size of a rectangle.
Defined in Rectangle.js

Constructors

FreshLogicStudios.Scripts.Drawing.Rectangle(<Point> location, <Size> size)
Initializes a new instance of the Rectangle class with the specified location and size.

Parameters

  • location - A Point that represents the upper-left corner of the rectangular region.
  • size - A Size that represents the width and height of the rectangular region.

Properties

  • Point Location
    Gets or sets the coordinates of the upper-left corner of this Rectangle.
  • Size Size
    Gets or sets the size of this Rectangle.

Methods

  • Object Clone()
    Creates a new instance of a Rectangle with the same values as this Rectangle.
  • Boolean Contains(<Point> pt)
    Determines if the specified point is contained within the rectangular region defined by this Rectangle.

    Parameters

    • pt - The Point to test.

    Return Values

    True if the specified point is contained within this Rectangle; otherwise false.
  • Boolean Equals(<Object> obj)
    Tests whether obj is a Rectangle with the same location and size of this Rectangle.

    Parameters

    • obj - The Object to test.

    Return Values

    This method returns true if obj is a Rectangle and its X, Y, Width, and Height properties are equal to the corresponding properties of this Rectangle; otherwise, false.
  • Object GetBottom()
    Gets the y-coordinate of the bottom edge of this Rectangle structure.
  • Object GetHeight()
    Gets the height of this Rectangle.
  • Object GetLeft()
    Gets the x-coordinate of the left edge of this Rectangle.
  • Object GetRight()
    Gets the x-coordinate of the right edge of this Rectangle.
  • Object GetTop()
    Gets the y-coordinate of the top edge of this Rectangle.
  • Object GetWidth()
    Gets the width of this Rectangle structure.
  • Object GetX()
    Gets the x-coordinate of the upper-left corner of this Rectangle.
  • Object GetY()
    Gets the y-coordinate of the upper-left corner of this Rectangle.
  • void Inflate(<Size> size)
    Inflates this Rectangle by the specified amount. This method inflates this rectangle, not a copy of it. The inflation along an axis is in two directions (minus direction and plus direction). For example, if a 50 by 50 rectangle is inflated by 50 in the x-axis, the resultant rectangle will be 150 units long (the original 50, the 50 in the minus direction, and the 50 in the plus direction) maintaining the rectangle's geometric center.

    Parameters

    • size - The amount to inflate this rectangle.
  • void Intersect(<Rectangle> rect)
    Replaces this Rectangle with the intersection of itself and the specified Rectangle.

    Parameters

    • rect - The Rectangle with which to intersect.
  • Boolean IntersectsWith(<Rectangle> rect)
    Determines if this rectangle intersects with the specified Rectangle.

    Parameters

    • rect - The Rectangle to test.

    Return Values

    True if there is any intersection; otherwise false.
  • Boolean IsEmpty()
    Tests whether all numeric properties of this Rectangle have values of zero.

    Return Values

    True if the Width, Height, X, and Y properties of this Rectangle all have values of zero; otherwise, false.
  • void Offset(<Point> pos)
    Adjusts the location of this rectangle by the specified amount. This method adjusts the location of the upper-left corner horizontally by the x-coordinate of the specified point, and vertically by the y-coordinate of the specified point.

    Parameters

    • pos - Amount to offset the location.
  • void SetHeight(height)
    Sets the height of this Rectangle.
  • void SetWidth(width)
    Sets the width of this Rectangle.
  • void SetX(x)
    Sets the x-coordinate of the upper-left corner of this Rectangle.
  • void SetY(y)
    Sets the y-coordinate of the upper-left corner of this Rectangle.
  • String ToString()
    Converts the attributes of this Rectangle to a human-readable string.

    Return Values

    A string that contains the position, width, and height of this Rectangle.
  • static Rectangle FromLTRB(<Int> left, <Int> top, <Int> right, <Int> bottom)
    Creates a Rectangle with the specified edge locations.

    Parameters

    • left - The x-coordinate of the upper-left corner of this Rectangle.
    • top - The y-coordinate of the upper-left corner of this Rectangle.
    • right - The x-coordinate of the lower-right corner of this Rectangle.
    • bottom - The y-coordinate of the lower-right corner of this Rectangle.

    Return Values

    A Rectangle with the specified upper-left and lower-right corners.
  • static Rectangle Union(<Rectangle> a, <Rectangle> b)
    Gets a Rectangle that contains the union of two Rectangles.

    Parameters

    • a - A Rectangle to union.
    • b - A Rectangle to union.

    Return Values

    A Rectangle that bounds the union of the two Rectangle structures.