Method AlignRectInRect
AlignRectInRect(bool, RectD, RectD, CoordAlignment, bool)
Aligns vertical or horizontal coordinates of the specified rectangle in the container using the alignment options.
public static RectD AlignRectInRect(bool vert, RectD rect, RectD container, CoordAlignment alignment, bool shrinkSize = true)
Parameters
vert
boolWhether to align vertical or horizontal coordinate.
rect
RectDRectangle to align.
container
RectDContainer rectangle.
alignment
CoordAlignmentAlignment to apply.
shrinkSize
boolWhether to shrink size of the rectangle to fit in the container. Optional. Default is
true
. Only width (whenvert
is false) or height (whenvert
is true) is shrinked.
Returns
AlignRectInRect(RectD, RectD, HorizontalAlignment?, VerticalAlignment?, bool)
Aligns the specified rectangle in the container using horizontal and vertical alignment options.
public static RectD AlignRectInRect(RectD rect, RectD container, HorizontalAlignment? horz, VerticalAlignment? vert, bool shrinkSize = true)
Parameters
rect
RectDRectangle to align.
container
RectDContainer rectangle.
horz
HorizontalAlignment?Horizontal alignment.
vert
VerticalAlignment?Vertical alignment.
shrinkSize
boolWhether to shrink size of the rectangle to fit in the container. Optional. Default is
true
.