|
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace MatrixMathHelpers
{
public class RectHelper
{
Rect _value;
public Rect Value
{
get { return _value; }
set { _value = value; }
}
public RectHelper(Rect Input)
{
_value = Input;
}
public RectHelper()
{
}
// Summary:
// Gets the position of the top-left corner of the rectangle.
//
// Returns:
// The position of the top-left corner of the rectangle.
public Point TopLeft
{
get { return (new Point(_value.X, _value.Y)); }
}
//
// Summary:
// Gets the position of the top-right corner of the rectangle.
//
// Returns:
// The position of the top-right corner of the rectangle.
public Point TopRight
{
get { return (new Point(_value.X + _value.Width, _value.Y)); }
}
//
// Summary:
// Gets the position of the bottom-left corner of the rectangle
//
// Returns:
// The position of the bottom-left corner of the rectangle.
public Point BottomLeft
{
get { return (new Point(_value.X, _value.Y + _value.Height)); }
}
//
// Summary:
// Gets the position of the bottom-right corner of the rectangle.
//
// Returns:
// The position of the bottom-right corner of the rectangle.
public Point BottomRight
{
get { return (new Point(_value.X + _value.Width, _value.Y + _value.Height)); }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work in the Bay Area primarily developing software on the Windows platform using C++, .NET/C#, WPF, and Silverlight.