Spot

StockSharp.Xaml.Diagram.GXDiagram

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(Point)

Create a spot defining a particular relative point in a rectangle.

location
Spot(double, double, double, double)

Create a spot defining a particular relative point in a rectangle plus an offset.

x
y
offx
offy
Spot(Point, Point)

Create a spot defining a particular relative point in a rectangle plus an offset.

location
offset
Spot(double, double)

Create a spot defining a particular relative point in a rectangle.

x
y

Properties

IsDefault : bool

True if and only if this spot is equal to Default.

IsNone : bool

True if and only if this spot is equal to None.

IsNoSpot : bool

True if this is an unspecific special spot, such as None or one of the sides.

IsNotNone : bool

True if and only if this spot is different than None.

IsSide : bool

True if this is a special spot referring to one (or more) of the sides.

IsSpot : bool

True if this spot represents a specific spot, not a side nor None.

OffsetX : double

The final additional offset along the X-axis.

OffsetY : double

The final additional offset along the Y-axis.

Opposite : Spot

Return a new spot that is opposite this spot.

WithoutOffset : Spot

Return a new spot with the same X and Y values, but with offsets of zero.

X : double

The fractional point along the X-axis.

Y : double

The fractional point along the Y-axis.

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

Parse(string, IFormatProvider) : Spot

Convert a string into a Spot value.

source
provider
Parse(string) : Spot

Convert a string into a Spot value.

source
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() : string

Produce a string representation of a Spot.

ToString(IFormatProvider) : string

Produce a string representation of a Spot.

Fields

AllSides : Spot

The set of points on all sides of the bounding rectangle.

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.

Center : Spot

The specific point at the very center of the bounding rectangle.

Default : Spot

Use this Spot value to indicate that the real spot value is elsewhere.

LeftRightSides : Spot

The set of points at the left or right sides of the bounding rectangle.

LeftSide : Spot

The set of points at the left side 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.

MiddleTop : Spot

A synonym for TopCenter.

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.

RightSide : Spot

The set of points at the right side of the bounding rectangle.

TopBottomSides : Spot

The set of points at the top or bottom sides of the bounding rectangle.

TopCenter : Spot

The specific point at the center of the top side of the bounding rectangle.

TopLeft : Spot

The specific point at the top-left corner of the bounding rectangle.

TopLeftSides : Spot

The set of points at the top or left sides of the bounding rectangle.

TopRight : Spot

The specific point at the top-right corner of the bounding rectangle.

TopRightSides : Spot

The set of points at the top or right sides of the bounding rectangle.

TopSide : Spot

The set of points at the top side of the bounding rectangle.