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
vertboolWhether to align vertical or horizontal coordinate.
rectRectDRectangle to align.
containerRectDContainer rectangle.
alignmentCoordAlignmentAlignment to apply.
shrinkSizeboolWhether to reduce size of the rectangle to fit in the container. Optional. Default is
true. Only width (whenvertis false) or height (whenvertis true) is reduced.
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
rectRectDRectangle to align.
containerRectDContainer rectangle.
horzHorizontalAlignment?Horizontal alignment.
vertVerticalAlignment?Vertical alignment.
shrinkSizeboolWhether to shrink size of the rectangle to fit in the container. Optional. Default is
true.