[]
        
(Showing Draft Content)

GrapeCity.Documents.Layout.LayoutView

Class LayoutView

Namespace
GrapeCity.Documents.Layout
Assembly
GcDocs.Imaging.dll

Represents a transformed surface with a set of LayoutRect objects.

public class LayoutView
Inheritance
object
LayoutView
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

BaseView

Gets a LayoutView to be used as the base for the current view's relative transformation.

public LayoutView BaseView { get; }

Property Value

LayoutView

Frozen

Gets a value indicating if the LayoutView does not allow any modifications.

public bool Frozen { get; }

Property Value

bool

Height

Gets or sets the height of the view rectangle.

public float Height { get; set; }

Property Value

float

Host

Gets the owner LayoutHost object.

public LayoutHost Host { get; }

Property Value

LayoutHost

InverseTransform

Gets the inverted transformation matrix.

InverseTransform is automatically updated when setting the Transform property.

public Matrix InverseTransform { get; }

Property Value

Matrix

RelativeTransform

Gets the transformation matrix relative to the BaseView.

public Matrix RelativeTransform { get; }

Property Value

Matrix

Tag

Gets or sets the object that contains data about the LayoutView.

public object Tag { get; set; }

Property Value

object

Transform

Gets or sets the transformation matrix for the LayoutView.

public Matrix Transform { get; set; }

Property Value

Matrix

Width

Gets or sets the width of the view rectangle.

public float Width { get; set; }

Property Value

float

Methods

ApplyOffset(LayoutView, float, float)

Moves the current LayoutView to a new position relative to another LayoutView.

public void ApplyOffset(LayoutView otherView, float xOffset, float yOffset)

Parameters

otherView LayoutView

The other LayoutView or null to reference the LayoutHost.

xOffset float

The X offset in other view's coordinates.

yOffset float

The Y offset in other view's coordinates.

AsRectF()

Returns a System.Drawing.RectangleF with the same Width and Height as the view rectangle.

public RectangleF AsRectF()

Returns

System.Drawing.RectangleF

The resulting System.Drawing.RectangleF.

CreateContour(object)

Creates a new Contour and associates it with the LayoutView.

public Contour CreateContour(object tag = null)

Parameters

tag object

The object that contains data about the Contour.

Returns

Contour

The created Contour object.

CreatePoint(float, float, float, float)

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)

Parameters

widthFactor float

The value to be multiplied by Width before adding to the position of the left side.

heightFactor float

The value to be multiplied by Height before adding to the position of the top side.

leftOffset float

The value to be added to the position of the left side.

topOffset float

The value to be added to the position of the top side.

Returns

AnchorPoint

The created AnchorPoint object.

CreateRect(object)

Creates a new LayoutRect and associates it with the LayoutView.

public LayoutRect CreateRect(object tag = null)

Parameters

tag object

The object that contains data about the LayoutRect.

Returns

LayoutRect

The created LayoutRect object.

DetachFromHost()

Detaches the LayoutView from its owner LayoutHost and removes all constraints referencing objects on the LayoutView.

public void DetachFromHost()

GetContentRectangleF(bool)

Calculates the minimal System.Drawing.RectangleF that contains all non-empty LayoutRects, excluding the view itself.

public RectangleF GetContentRectangleF(bool oneDimensionNonZero = false)

Parameters

oneDimensionNonZero bool

If 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.

Returns

System.Drawing.RectangleF

The resulting System.Drawing.RectangleF.

MapToView(LayoutView, PointF)

Transforms a point from the current LayoutView coordinates to other view's coordinates.

public PointF MapToView(LayoutView targetView, PointF point)

Parameters

targetView LayoutView

The destination LayoutView or null to reference the LayoutHost.

point System.Drawing.PointF

The point in the source LayoutView coordinates.

Returns

System.Drawing.PointF

The transformed point.

MapToView(LayoutView, PointF[])

Transforms the array of points from the current LayoutView coordinates to other view's coordinates.

public void MapToView(LayoutView targetView, PointF[] points)

Parameters

targetView LayoutView

The destination LayoutView or null to reference the LayoutHost.

points System.Drawing.PointF[]

The array of points in the source LayoutView coordinates.

SetRelativeTransform(LayoutView, Matrix)

Sets the transformation matrix relative to other LayoutView.

public void SetRelativeTransform(LayoutView baseView, Matrix relativeTransform)

Parameters

baseView LayoutView

A LayoutView to be used as the base for relative transformation.

relativeTransform Matrix

The transformation matrix relative to the baseView.