[]
Represents a rectangle with constraints.
public class LayoutRect
Gets a value indicating if the LayoutRect does not allow any modifications.
public bool Frozen { get; }
Gets a value indicating whether the LayoutRect occupies non-zero area.
public bool HasArea { get; }
Gets a value indicating whether the LayoutRect has non-zero width or height.
public bool HasDimension { get; }
Gets the height of the LayoutRect.
public float Height { get; }
Gets a value indicating if the LayoutRect is invalid.
public bool Invalid { get; }
Gets the coordinates of the top left corner.
public PointF P0 { get; }
Gets the X coordinate of the top left corner.
public float P0X { get; }
Gets the Y coordinate of the top left corner.
public float P0Y { get; }
Gets the coordinates of the top right corner.
public PointF P1 { get; }
Gets the X coordinate of the top right corner.
public float P1X { get; }
Gets the Y coordinate of the top right corner.
public float P1Y { get; }
Gets the coordinates of the bottom left corner.
public PointF P2 { get; }
Gets the X coordinate of the bottom left corner.
public float P2X { get; }
Gets the Y coordinate of the bottom left corner.
public float P2Y { get; }
Gets the coordinates of the bottom right corner.
public PointF P3 { get; }
Gets the X coordinate of the bottom right corner.
public float P3X { get; }
Gets the Y coordinate of the bottom right corner.
public float P3Y { get; }
Gets a value indicating if the LayoutRect is resolved.
public bool Resolved { get; }
Gets a value indicating if the LayoutRect is resolved and valid.
public bool ResolvedAndValid { get; }
Gets the actual rotation angle of the LayoutRect, in degrees.
public int RotationAngle { get; }
Gets or sets the object that contains data about the LayoutRect.
public object Tag { get; set; }
Gets the transformation matrix of the LayoutRect taking into account the owner LayoutView transformation, the top left corner position (P0), and the rotation angle.
public Matrix Transform { get; }
Gets the owner LayoutView object.
public LayoutView View { get; }
Gets the width of the LayoutRect.
public float Width { get; }
Anchors a LayoutRect to the bottom left corner and rotation angle of anchorRect
and sets width/height.
public void AnchorBottomLeft(LayoutRect anchorRect, float paddingBottom, float paddingLeft, float width, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
width
floatThe proposed width.
height
floatThe proposed height.
Anchors a LayoutRect to the bottom left corner and rotation angle of anchorRect
.
The top right corner is not fixed and requires additional constraints.
public void AnchorBottomLeft(LayoutRect anchorRect, float paddingBottom, float paddingLeft)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
Anchors a LayoutRect to the bottom, left, right sides and rotation angle of anchorRect
and sets the height.
public void AnchorBottomLeftRight(LayoutRect anchorRect, float paddingBottom, float paddingLeft, float paddingRight, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
height
floatThe proposed height.
Anchors a LayoutRect to the bottom, left, right sides and rotation angle of anchorRect
.
The top side is not fixed and requires an additional constraint.
public void AnchorBottomLeftRight(LayoutRect anchorRect, float paddingBottom, float paddingLeft, float paddingRight)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
Anchors a LayoutRect to the bottom right corner and rotation angle of anchorRect
and sets width/height.
public void AnchorBottomRight(LayoutRect anchorRect, float paddingBottom, float paddingRight, float width, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
width
floatThe proposed width.
height
floatThe proposed height.
Anchors a LayoutRect to the bottom right corner and rotation angle of anchorRect
.
The top left corner is not fixed and requires additional constraints.
public void AnchorBottomRight(LayoutRect anchorRect, float paddingBottom, float paddingRight)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
Deflates a LayoutRect relative to anchorRect
.
public void AnchorDeflate(LayoutRect anchorRect, float deflateLeft, float deflateTop, float deflateRight, float deflateBottom)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
deflateLeft
floatThe amount to deflate the left bound relative to anchorRect
.
deflateTop
floatThe amount to deflate the top bound relative to anchorRect
.
deflateRight
floatThe amount to deflate the left and right bounds relative to anchorRect
.
deflateBottom
floatThe amount to deflate the top and bottom bounds relative to anchorRect
.
Deflates a LayoutRect relative to anchorRect
.
public void AnchorDeflate(LayoutRect anchorRect, float deflateHorizontal, float deflateVertical)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
deflateHorizontal
floatThe amount to deflate the left and right bounds relative to anchorRect
.
deflateVertical
floatThe amount to deflate the top and bottom bounds relative to anchorRect
.
Deflates a LayoutRect relative to anchorRect
.
public void AnchorDeflate(LayoutRect anchorRect, float deflateAmount)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
deflateAmount
floatThe amount to deflate the bounds relative to anchorRect
.
Anchors a LayoutRect to exactly the same bounds and rotation angle as anchorRect
.
public void AnchorExact(LayoutRect anchorRect)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
Anchors a LayoutRect to the left and right sides and rotation angle of anchorRect
and sets zero height.
The vertical position is not fixed and requires an additional constraint.
public void AnchorHorizontalLine(LayoutRect anchorRect)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
Inflates a LayoutRect relative to anchorRect
.
public void AnchorInflate(LayoutRect anchorRect, float inflateLeft, float inflateTop, float inflateRight, float inflateBottom)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
inflateLeft
floatThe amount to inflate the left bound relative to anchorRect
.
inflateTop
floatThe amount to inflate the top bound relative to anchorRect
.
inflateRight
floatThe amount to inflate the left and right bounds relative to anchorRect
.
inflateBottom
floatThe amount to inflate the top and bottom bounds relative to anchorRect
.
Inflates a LayoutRect relative to anchorRect
.
public void AnchorInflate(LayoutRect anchorRect, float inflateHorizontal, float inflateVertical)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
inflateHorizontal
floatThe amount to inflate the left and right bounds relative to anchorRect
.
inflateVertical
floatThe amount to inflate the top and bottom bounds relative to anchorRect
.
Inflates a LayoutRect relative to anchorRect
.
public void AnchorInflate(LayoutRect anchorRect, float inflateAmount)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
inflateAmount
floatThe amount to inflate the bounds relative to anchorRect
.
Anchors a LayoutRect to the left and right sides and rotation angle of anchorRect
and sets the height.
The vertical position is not fixed and requires an additional constraint.
public void AnchorLeftRight(LayoutRect anchorRect, float paddingLeft, float paddingRight, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
height
floatThe proposed height.
Anchors a LayoutRect to the left and right sides and rotation angle of anchorRect
.
The top and bottom sides are not fixed and require additional constraints.
public void AnchorLeftRight(LayoutRect anchorRect, float paddingLeft, float paddingRight)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
Anchors a LayoutRect to the left, top, bottom sides and rotation angle of anchorRect
and sets the width.
public void AnchorLeftTopBottom(LayoutRect anchorRect, float paddingLeft, float paddingTop, float paddingBottom, float width)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
width
floatThe proposed width.
Anchors a LayoutRect to the left, top, bottom sides and rotation angle of anchorRect
.
The right side is not fixed and requires an additional constraint.
public void AnchorLeftTopBottom(LayoutRect anchorRect, float paddingLeft, float paddingTop, float paddingBottom)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
Anchors a LayoutRect to the right, top, bottom sides and rotation angle of anchorRect
and sets the width.
public void AnchorRightTopBottom(LayoutRect anchorRect, float paddingRight, float paddingTop, float paddingBottom, float width)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
width
floatThe proposed width.
Anchors a LayoutRect to the right, top, bottom sides and rotation angle of anchorRect
.
The left side is not fixed and requires an additional constraint.
public void AnchorRightTopBottom(LayoutRect anchorRect, float paddingRight, float paddingTop, float paddingBottom)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
Anchors a LayoutRect to the top and bottom sides and rotation angle of anchorRect
and sets the width.
The horizontal position is not fixed and requires an additional constraint.
public void AnchorTopBottom(LayoutRect anchorRect, float paddingTop, float paddingBottom, float width)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
width
floatThe proposed width.
Anchors a LayoutRect to the top and bottom sides and rotation angle of anchorRect
.
The left and right sides are not fixed and require additional constraints.
public void AnchorTopBottom(LayoutRect anchorRect, float paddingTop, float paddingBottom)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingBottom
floatThe inner padding relative to the bottom side of the anchorRect
.
Anchors a LayoutRect to the top left corner and rotation angle of anchorRect
and sets width/height.
public void AnchorTopLeft(LayoutRect anchorRect, float paddingTop, float paddingLeft, float width, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
width
floatThe proposed width.
height
floatThe proposed height.
Anchors a LayoutRect to the top left corner and rotation angle of anchorRect
.
The bottom right corner is not fixed and requires additional constraints.
public void AnchorTopLeft(LayoutRect anchorRect, float paddingTop, float paddingLeft)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
Anchors a LayoutRect to the top, left, right sides and rotation angle of anchorRect
and sets the height.
public void AnchorTopLeftRight(LayoutRect anchorRect, float paddingTop, float paddingLeft, float paddingRight, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
height
floatThe proposed height.
Anchors a LayoutRect to the top, left, right sides and rotation angle of anchorRect
.
The bottom side is not fixed and requires an additional constraint.
public void AnchorTopLeftRight(LayoutRect anchorRect, float paddingTop, float paddingLeft, float paddingRight)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingLeft
floatThe inner padding relative to the left side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
Anchors a LayoutRect to the top right corner and rotation angle of anchorRect
and sets width/height.
public void AnchorTopRight(LayoutRect anchorRect, float paddingTop, float paddingRight, float width, float height)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
width
floatThe proposed width.
height
floatThe proposed height.
Anchors a LayoutRect to the top right corner and rotation angle of anchorRect
.
The bottom left corner is not fixed and requires additional constraints.
public void AnchorTopRight(LayoutRect anchorRect, float paddingTop, float paddingRight)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
paddingTop
floatThe inner padding relative to the top side of the anchorRect
.
paddingRight
floatThe inner padding relative to the right side of the anchorRect
.
Anchors a LayoutRect to the top and bottom sides and rotation angle of anchorRect
and sets zero width.
The horizontal position is not fixed and requires an additional constraint.
public void AnchorVerticalLine(LayoutRect anchorRect)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
Adds a MaxBottom constraint relative to anchorPoint
.
public PositionConstraint AppendMaxBottom(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MaxBottom constraint relative to contour
.
public ContourConstraint AppendMaxBottom(Contour contour, ContourPosition contourPosition)
contour
ContourThe referenced Contour.
contourPosition
ContourPositionThe position of anchor for the contour constraint.
New constraint just added.
Adds a MaxBottom constraint relative to anchorRect
.
public PositionConstraint AppendMaxBottom(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MaxHeight constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint AppendMaxHeight(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a MaxHeight constraint relative to anchorRect
.
public SizeConstraint AppendMaxHeight(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a MaxHeight constraint.
public SizeConstraint AppendMaxHeight(float maxHeight)
maxHeight
floatThe proposed maximum height.
New constraint just added.
Adds a MaxLeft constraint relative to anchorPoint
.
public PositionConstraint AppendMaxLeft(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MaxLeft constraint relative to anchorRect
.
public PositionConstraint AppendMaxLeft(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MaxRight constraint relative to anchorPoint
.
public PositionConstraint AppendMaxRight(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MaxRight constraint relative to contour
.
public ContourConstraint AppendMaxRight(Contour contour, ContourPosition contourPosition)
contour
ContourThe referenced Contour.
contourPosition
ContourPositionThe position of anchor for the contour constraint.
New constraint just added.
Adds a MaxRight constraint relative to anchorRect
.
public PositionConstraint AppendMaxRight(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MaxTop constraint relative to anchorPoint
.
public PositionConstraint AppendMaxTop(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MaxTop constraint relative to anchorRect
.
public PositionConstraint AppendMaxTop(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MaxWidth constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint AppendMaxWidth(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a MaxWidth constraint relative to anchorRect
.
public SizeConstraint AppendMaxWidth(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a MaxWidth constraint.
public SizeConstraint AppendMaxWidth(float maxWidth)
maxWidth
floatThe proposed maximum width.
New constraint just added.
Adds a MinBottom constraint relative to anchorPoint
.
public PositionConstraint AppendMinBottom(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MinBottom constraint relative to anchorRect
.
public PositionConstraint AppendMinBottom(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MinHeight constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint AppendMinHeight(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a MinHeight constraint relative to anchorRect
.
public SizeConstraint AppendMinHeight(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a MinHeight constraint.
public SizeConstraint AppendMinHeight(float minHeight)
minHeight
floatThe proposed minimum height.
New constraint just added.
Adds a MinLeft constraint relative to anchorPoint
.
public PositionConstraint AppendMinLeft(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MinLeft constraint relative to contour
.
public ContourConstraint AppendMinLeft(Contour contour, ContourPosition contourPosition)
contour
ContourThe referenced Contour.
contourPosition
ContourPositionThe position of anchor for the contour constraint.
New constraint just added.
Adds a MinLeft constraint relative to anchorRect
.
public PositionConstraint AppendMinLeft(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MinRight constraint relative to anchorPoint
.
public PositionConstraint AppendMinRight(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MinRight constraint relative to anchorRect
.
public PositionConstraint AppendMinRight(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MinTop constraint relative to anchorPoint
.
public PositionConstraint AppendMinTop(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a MinTop constraint relative to contour
.
public ContourConstraint AppendMinTop(Contour contour, ContourPosition contourPosition)
contour
ContourThe referenced Contour.
contourPosition
ContourPositionThe position of anchor for the contour constraint.
New constraint just added.
Adds a MinTop constraint relative to anchorRect
.
public PositionConstraint AppendMinTop(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a MinWidth constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint AppendMinWidth(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a MinWidth constraint relative to anchorRect
.
public SizeConstraint AppendMinWidth(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a MinWidth constraint.
public SizeConstraint AppendMinWidth(float minWidth)
minWidth
floatThe proposed minimum width.
New constraint just added.
Adds a PositionConstraint relative to anchorPoint
.
public PositionConstraint AppendPositionConstraint(TargetParam targetParam, AnchorPoint anchorPoint, float offset = 0)
targetParam
TargetParamThe target parameter of the current LayoutRect.
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a PositionConstraint relative to anchorRect
.
public PositionConstraint AppendPositionConstraint(TargetParam targetParam, LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
targetParam
TargetParamThe target parameter of the current LayoutRect.
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a SizeConstraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint AppendSizeConstraint(TargetParam targetParam, AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
targetParam
TargetParamThe target parameter of the current LayoutRect.
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a SizeConstraint relative to anchorRect
.
public SizeConstraint AppendSizeConstraint(TargetParam targetParam, LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
targetParam
TargetParamThe target parameter of the current LayoutRect.
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a SizeConstraint.
public SizeConstraint AppendSizeConstraint(TargetParam targetParam, float size)
targetParam
TargetParamThe target parameter of the current LayoutRect.
size
floatThe proposed value of the width or height.
New constraint just added.
Adds a StarWidth or StarHeight constraint.
public StarSizeConstraint AppendStarSizeConstraint(TargetParam targetParam, float starSize)
targetParam
TargetParamThe target parameter of the current LayoutRect.
starSize
floatThe proposed star width or height (weight).
New constraint just added.
Returns a System.Drawing.RectangleF with the same Width and Height as this LayoutRect.
public RectangleF AsRectF()
The resulting System.Drawing.RectangleF.
Determines if the rectangular region represented by otherRect
is entirely contained within this LayoutRect.
public bool Contains(LayoutRect otherRect)
otherRect
LayoutRectThe LayoutRect to test or null to reference the owner LayoutView.
true if the rectangular region represented by otherRect
is entirely contained within this LayoutRect; otherwise, false.
Creates a point to be used as an anchor for other LayoutRects.
public AnchorPoint CreatePoint(float widthFactor, float heightFactor, float leftOffset = 0, float topOffset = 0)
widthFactor
floatThe value to be multiplied by Width before adding to the position of the left side.
heightFactor
floatThe value to be multiplied by Height before adding to the position of the top side.
leftOffset
floatThe value to be added to the position of the left side.
topOffset
floatThe value to be added to the position of the top side.
The created AnchorPoint object.
Detaches the LayoutRect from its owner LayoutView and removes all constraints referencing the LayoutRect.
public void DetachFromView()
Searches for the AngleConstraint.
public AngleConstraint GetAngleConstraint()
Gets the rotation angle of the current LayoutRect from the standpoint of the targetRect
.
public int GetAngleRelativeTo(LayoutRect targetRect)
targetRect
LayoutRectA LayoutRect which defines the base angle or null to reference the owner LayoutView.
The relative angle, in degrees.
Searches for the AspectRatioConstraint.
public AspectRatioConstraint GetAspectRatioConstraint()
Searches for a constraint for the specified target parameter, referencing the given LayoutRect.
public Constraint GetConstraint(TargetParam targetParam, LayoutRect anchorRect, AnchorParam anchorParam = AnchorParam.None)
targetParam
TargetParamThe target parameter of the Constraint to search for.
anchorRect
LayoutRectThe referenced (anchor) LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchor LayoutRect; AnchorParam.None means any anchor parameter.
The found Constraint object or null if the constraint is not found.
Searches for the first constraint for the specified target parameter.
public Constraint GetConstraint(TargetParam targetParam)
targetParam
TargetParamThe target parameter of the Constraint to search for.
The found Constraint object or null if the target parameter is not found.
Returns the list of ContourConstraints.
public List<ContourConstraint> GetContourConstraints()
Returns a System.Drawing.RectangleF that represents the intersection of two rectangles, relative to this LayoutRect.
public RectangleF GetIntersectionRelativeToSelf(LayoutRect otherRect)
otherRect
LayoutRectA LayoutRect which may have an intersection with this LayoutRect or null to reference the owner LayoutView.
The resulting System.Drawing.RectangleF or an empty rectangle if there is no intersection.
Returns a System.Drawing.RectangleF that represents the intersection of two rectangles, relative to the view rectangle.
public RectangleF GetIntersectionRelativeToView(LayoutRect otherRect)
otherRect
LayoutRectA LayoutRect which may have an intersection with this LayoutRect or null to reference the owner LayoutView.
The resulting System.Drawing.RectangleF or an empty rectangle if there is no intersection.
Searches for the first PositionConstraint for the specified target parameter.
public PositionConstraint GetPositionConstraint(TargetParam targetParam)
targetParam
TargetParamSearches for the first SizeConstraint for the specified target parameter.
public SizeConstraint GetSizeConstraint(TargetParam targetParam)
targetParam
TargetParamSearches for the StarSizeConstraint for the specified target parameter.
public StarSizeConstraint GetStarSizeConstraint(TargetParam targetParam)
targetParam
TargetParamDetermines if this LayoutRect intersects with otherRect
.
public bool IntersectsWith(LayoutRect otherRect)
otherRect
LayoutRectThe LayoutRect to test or null to reference the owner LayoutView.
true if there is any intersection; otherwise, false.
Detaches all constraints from the current LayoutRect.
public bool RemoveAllConstraints()
true if one or more Constraints were successfully detached.
Detaches the specified Constraint from the LayoutRect.
public bool RemoveConstraint(Constraint constraint)
constraint
ConstraintThe Constraint to be detached.
true if the Constraint is successfully detached.
Detaches the first constraint for the specified target parameter.
public bool RemoveConstraint(TargetParam targetParam)
targetParam
TargetParamThe target parameter of the Constraint to search for.
true if the Constraint is found and successfully detached.
Adds an Angle constraint relative to anchorRect
.
public AngleConstraint SetAngle(LayoutRect anchorRect, int relativeAngle = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
relativeAngle
intThe rotation angle relative to anchorRect
, in degrees.
New constraint just added.
Adds an AspectRatio constraint.
public AspectRatioConstraint SetAspectRatio(float aspectRatio)
aspectRatio
floatThe aspect (width to height) ratio.
New constraint just added.
Adds a Bottom constraint relative to anchorPoint
.
public PositionConstraint SetBottom(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a Bottom constraint relative to anchorRect
.
public PositionConstraint SetBottom(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Bottom constraint relative to anchorRect
and the corresponding opposite constraint.
public PositionConstraint SetBottomAndOpposite(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Height constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint SetHeight(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a Height constraint relative to anchorRect
.
public SizeConstraint SetHeight(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a Height constraint.
public SizeConstraint SetHeight(float height)
height
floatThe proposed height.
New constraint just added.
Adds a HorizontalCenter constraint relative to anchorPoint
.
public PositionConstraint SetHorizontalCenter(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a HorizontalCenter constraint relative to anchorRect
.
public PositionConstraint SetHorizontalCenter(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Left constraint relative to anchorPoint
.
public PositionConstraint SetLeft(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a Left constraint relative to anchorRect
.
public PositionConstraint SetLeft(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Left constraint relative to anchorRect
and the corresponding opposite constraint.
public PositionConstraint SetLeftAndOpposite(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Right constraint relative to anchorPoint
.
public PositionConstraint SetRight(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a Right constraint relative to anchorRect
.
public PositionConstraint SetRight(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Right constraint relative to anchorRect
and the corresponding opposite constraint.
public PositionConstraint SetRightAndOpposite(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a StarHeight constraint.
public StarSizeConstraint SetStarHeight(float starHeight)
starHeight
floatThe proportional height (weight).
New constraint just added.
Adds a StarWidth constraint.
public StarSizeConstraint SetStarWidth(float starWidth)
starWidth
floatThe proportional width (weight).
New constraint just added.
Adds a Top constraint relative to anchorPoint
.
public PositionConstraint SetTop(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a Top constraint relative to anchorRect
.
public PositionConstraint SetTop(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Top constraint relative to anchorRect
and the corresponding opposite constraint.
public PositionConstraint SetTopAndOpposite(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a VerticalCenter constraint relative to anchorPoint
.
public PositionConstraint SetVerticalCenter(AnchorPoint anchorPoint, float offset = 0)
anchorPoint
AnchorPointThe referenced AnchorPoint.
offset
floatAn increment to the position of anchorPoint
.
New constraint just added.
Adds a VerticalCenter constraint relative to anchorRect
.
public PositionConstraint SetVerticalCenter(LayoutRect anchorRect, AnchorParam anchorParam, float offset = 0)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
offset
floatAn increment to the value of the source parameter.
New constraint just added.
Adds a Width constraint relative to the distance between anchorPoint1
and anchorPoint2
.
public SizeConstraint SetWidth(AnchorPoint anchorPoint1, AnchorPoint anchorPoint2, float delta = 0, float multiplier = 1)
anchorPoint1
AnchorPointThe first referenced AnchorPoint.
anchorPoint2
AnchorPointThe second referenced AnchorPoint.
delta
floatAn increment to the value of the source distance.
multiplier
floatA multiplier to the value of the source distance; applied before adding the delta
.
New constraint just added.
Adds a Width constraint relative to anchorRect
.
public SizeConstraint SetWidth(LayoutRect anchorRect, AnchorParam anchorParam, float delta = 0, float multiplier = 1)
anchorRect
LayoutRectThe referenced LayoutRect or null to reference the owner LayoutView.
anchorParam
AnchorParamThe source parameter of the anchorRect
.
delta
floatAn increment to the value of the source (anchor) parameter.
multiplier
floatA multiplier to the value of the source parameter; applied before adding the delta
.
New constraint just added.
Adds a Width constraint.
public SizeConstraint SetWidth(float width)
width
floatThe proposed width.
New constraint just added.
Converts a LayoutRect to System.Drawing.RectangleF relative to the targetRect
.
public RectangleF ToRectangleF(LayoutRect targetRect = null)
targetRect
LayoutRectA LayoutRect which defines the base angle and position or null to reference the owner LayoutView.
The resulting System.Drawing.RectangleF.
Returns a string that represents the current LayoutRect.
public override string ToString()