VDocs.NET
Back to DOM

DOM.Elements.Graphics.Transform

Namespace: DOM.Elements.Graphics

Represents the complete transformation and layout properties for a graphic element.

Theclass consolidates all spatial, positioning, and layout properties that can be applied to a graphic element (image, shape, etc.) within a document. It provides a unified API for controlling where and how a graphic appears on the page. The transformation properties include: – Placement of the graphic using absolute coordinates or alignment – Width, height, and scaling of the graphic – Angular rotation of the graphic – Spacing around the graphic – Visual effects like shadows or reflections – Layering order relative to other elements – How text flows around the graphic All properties are nullable to allow for incremental building of the graphic's visual presentation. Consumers should check for null values and apply appropriate defaults when rendering.

14 members

Constructors

Transform

3 overloads
Transform()

Initializes a new instance of theclass with default (null) values for all properties.

Transform(Position position, Dimensions dimensions)

Initializes a new instance of theclass with specified position and dimensions.

This constructor provides a convenient way to create a transform with the most commonly used properties.

Parameters

position
The positioning of the graphic.
dimensions
The dimensions (size) of the graphic.
Transform(Position position, Dimensions dimensions, Rotation rotation)

Initializes a new instance of theclass with specified position, dimensions, and rotation.

Parameters

position
The positioning of the graphic.
dimensions
The dimensions (size) of the graphic.
rotation
The rotation angle of the graphic.

Properties

Dimensions

Gets or sets the dimensions (size) of the graphic.

Theproperty defines the size of the graphic on the page. It supports both absolute sizing (using width and height with measurement units) and relative scaling (using scale percentages). When both absolute dimensions and scale percentages are specified, the scale is applied relative to the absolute dimensions.

EffectExtent

Gets or sets the visual effect extent for the graphic.

Theproperty controls how much space visual effects (such as drop shadows, glows, or reflections) occupy around the graphic. This ensures that effects are properly rendered without being clipped by the graphic's bounding box.

Margin

Gets or sets the margin space around the graphic.

Margins define the empty space between the graphic's outer boundary and surrounding content (such as text or other elements). Margins can be uniform (same value on all sides) or asymmetrical (different values for top, bottom, left, and right).

Position

Gets or sets the positioning of the graphic within its containing context.

Theproperty controls where the graphic is placed on the page or within its container. It supports: Absolute positioning using X and Y coordinates Alignment-based positioning (centered, left, right, etc.) Mixed positioning (horizontal alignment with vertical absolute, and vice versa) Relative positioning reference frames (page, margin, paragraph, line, etc.)

Rotation

Gets or sets the rotation angle of the graphic.

Rotation is applied around the graphic's anchor point, which is typically the center of the bounding box or the position reference point. The rotation angle is automatically normalized to the range [0, 360) by theclass. Positive values rotate clockwise, negative values rotate counterclockwise.

TextWrapping

Gets or sets the text wrapping behavior for the graphic.

Theproperty controls the interaction between the graphic and surrounding text content. It supports various wrapping styles: Additional properties likeandprovide fine-grained control over the wrapping behavior. – The graphic is treated as an inline character – Text wraps around the graphic's rectangular bounding box – Text flows through the graphic – Text wraps only above and below – Text wraps tightly around the graphic's shape – Text does not wrap around the graphic

ZIndex

Gets or sets the Z-index (layering order) of the graphic.

Theproperty controls the visual layering of the graphic relative to other overlapping elements. Elements with higher Z-index values are rendered in front of elements with lower values. When Z-index is not specified, the natural document order determines the layering (later elements appear in front of earlier elements).

Methods

Clone

Transform Clone

Creates a deep copy of thisinstance.

This method performs a shallow copy of reference types (the properties are copied by reference, not cloned). For complete independence, consider manually cloning each property if needed.

Returns

Transform

A newinstance with copied property values.

CreateWithAbsolutePosition

Transform CreateWithAbsolutePosition(double x, double y, double width, double height, Units units)

Creates a newinstance with absolute positioning.

This is a factory method that creates a transform with absolute positioning and explicit dimensions, ready for use with a graphic.

Parameters

x
Horizontal position.
y
Vertical position.
width
Width of the graphic.
height
Height of the graphic.
units
Measurement unit for all values (default: points).

Returns

Transform

A newinstance with the specified properties.

CreateWithAlignment

Transform CreateWithAlignment(HorizontalAlignmentValues horizontalAlignment, VerticalAlignmentValues verticalAlignment, double width, double height, Units units)

Creates a newinstance with alignment-based positioning.

Parameters

horizontalAlignment
Horizontal alignment.
verticalAlignment
Vertical alignment.
width
Width of the graphic.
height
Height of the graphic.
units
Measurement unit for dimensions (default: points).

Returns

Transform

A newinstance with the specified properties.

ToString

ToString

Returns a string representation of the transformation properties.

Returns

A formatted string describing the current transformation state.

VDocs.NET
The .NET Word Document Library

Generate Word
documents.
Not XML.

Create professional documents in .NET without the complexity of OpenXML or Word Interop.

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in