Spot
A spot represents a relative point from (0,0) to (1,1) within the bounds of an element, plus an absolute offset.
Implements: IFormattable
Constructors
Spot(double, double, double, double)
Create a spot defining a particular relative point in a rectangle plus an offset.
- x
- y
- offx
- offy
Properties
WithoutOffset : Spot
Return a new spot with the same X and Y values, but with offsets of zero.
Methods
Equals(Spot, Spot) : bool
Two spots are equal if all four property values are the same (X, Y, OffsetX, OffsetY).
- spot1
- spot2
Returns: true if the two spots are equal
Equals(object) : bool
Two spots are equal if all four property values are the same (X, Y, OffsetX, OffsetY).
- obj
- any Object
Returns: true if the other object is a Spot and they are equal
Equals(Spot) : bool
Two spots are equal if all four property values are the same (X, Y, OffsetX, OffsetY).
- value
- a Spot
Returns: true if the two spots are equal
GetHashCode() : int
The hash code is a combination of all four property values.
GetSide(bool, bool, bool, bool) : Spot
Produce Spot that denotes one or more sides, based on which sides should be included.
- left
- top
- right
- bottom
Returns: If all of the arguments are false, this returns None; otherwise the resulting spot will be IsSide.
IncludesSide(Spot) : bool
This predicate is true if this Spot is a side that includes the side(s) given by .
- side
- a Spot that IsSide
op_Equality(Spot, Spot) : bool
Two spots are equal if all four property values are the same (X, Y, OffsetX, OffsetY).
- spot1
- spot2
Returns: true if the two spots are equal
op_Inequality(Spot, Spot) : bool
Inequality of spots.
- spot1
- spot2
Returns: true if the two spots are unequal
PointInRect(Rect) : Point
Given a rectangle, return the specific point in or near the rectangle that this spot is at.
- r
- a Rect
Returns: a Point
RectForPoint(Point, Size) : Rect
Given a point and the size of the desired rectangle, return the rectangle for which this spot is at that point.
- p
- a Point
- sz
- a Size
Returns: a Rect
ToString(IFormatProvider) : string
Produce a string representation of a Spot.
Fields
BottomCenter : Spot
The specific point at the middle of the bottom side of the bounding rectangle.
BottomLeft : Spot
The specific point at the bottom-left corner of the bounding rectangle.
BottomLeftSides : Spot
The set of points at the left or bottom sides of the bounding rectangle.
BottomRight : Spot
The specific point at the bottom-right corner of the bounding rectangle.
BottomRightSides : Spot
The set of points at the right or bottom sides of the bounding rectangle.
BottomSide : Spot
The set of points at the bottom side of the bounding rectangle.
LeftRightSides : Spot
The set of points at the left or right sides of the bounding rectangle.
MiddleBottom : Spot
A synonym for BottomCenter.
MiddleLeft : Spot
The specific point at the middle of the left side of the bounding rectangle.
MiddleRight : Spot
The specific point at the middle of the right side of the bounding rectangle.
None : Spot
Use this Spot value to indicate no particular spot -- code looking for a particular point on an element will need to do their own calculations to determine the desired point depending on the circumstances.
NotBottomSide : Spot
The set of points on all sides of the bounding rectangle except the bottom side.
NotLeftSide : Spot
The set of points on all sides of the bounding rectangle except the left side.
NotRightSide : Spot
The set of points on all sides of the bounding rectangle except the right side.
NotTopSide : Spot
The set of points on all sides of the bounding rectangle except the top side.
TopBottomSides : Spot
The set of points at the top or bottom sides of the bounding rectangle.
TopLeftSides : Spot
The set of points at the top or left sides of the bounding rectangle.
TopRightSides : Spot
The set of points at the top or right sides of the bounding rectangle.