[]
Represents a transformed surface with a set of LayoutRect objects.
public class LayoutView
Gets a LayoutView to be used as the base for the current view's relative transformation.
public LayoutView BaseView { get; }
Gets a value indicating if the LayoutView does not allow any modifications.
public bool Frozen { get; }
Gets or sets the height of the view rectangle.
public float Height { get; set; }
Gets the owner LayoutHost object.
public LayoutHost Host { get; }
Gets the inverted transformation matrix.
InverseTransform is automatically updated when setting the Transform property.
public Matrix InverseTransform { get; }
Gets the transformation matrix relative to the BaseView.
public Matrix RelativeTransform { get; }
Gets or sets the object that contains data about the LayoutView.
public object Tag { get; set; }
Gets or sets the transformation matrix for the LayoutView.
public Matrix Transform { get; set; }
Gets or sets the width of the view rectangle.
public float Width { get; set; }
Moves the current LayoutView to a new position relative to another LayoutView.
public void ApplyOffset(LayoutView otherView, float xOffset, float yOffset)
otherView
LayoutViewThe other LayoutView or null to reference the LayoutHost.
xOffset
floatThe X offset in other view's coordinates.
yOffset
floatThe Y offset in other view's coordinates.
Returns a System.Drawing.RectangleF with the same Width and Height as the view rectangle.
public RectangleF AsRectF()
The resulting System.Drawing.RectangleF.
Creates a new Contour and associates it with the LayoutView.
public Contour CreateContour(object tag = null)
tag
objectThe object that contains data about the Contour.
Creates a point associated with the LayoutView to be used as an anchor for 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.
Creates a new LayoutRect and associates it with the LayoutView.
public LayoutRect CreateRect(object tag = null)
tag
objectThe object that contains data about the LayoutRect.
The created LayoutRect object.
Detaches the LayoutView from its owner LayoutHost and removes all constraints referencing objects on the LayoutView.
public void DetachFromHost()
Calculates the minimal System.Drawing.RectangleF that contains all non-empty LayoutRects, excluding the view itself.
public RectangleF GetContentRectangleF(bool oneDimensionNonZero = false)
oneDimensionNonZero
boolIf true, all rectangles with non-zero width or height are taken into account. If false, both width and height must be non-zero for the rectangle to be taken into account.
The resulting System.Drawing.RectangleF.
Transforms a point from the current LayoutView coordinates to other view's coordinates.
public PointF MapToView(LayoutView targetView, PointF point)
targetView
LayoutViewThe destination LayoutView or null to reference the LayoutHost.
point
System.Drawing.PointFThe point in the source LayoutView coordinates.
The transformed point.
Transforms the array of points from the current LayoutView coordinates to other view's coordinates.
public void MapToView(LayoutView targetView, PointF[] points)
targetView
LayoutViewThe destination LayoutView or null to reference the LayoutHost.
points
System.Drawing.PointF[]The array of points in the source LayoutView coordinates.
Sets the transformation matrix relative to other LayoutView.
public void SetRelativeTransform(LayoutView baseView, Matrix relativeTransform)
baseView
LayoutViewA LayoutView to be used as the base for relative transformation.
relativeTransform
MatrixThe transformation matrix relative to the baseView
.