Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Struct

OfficeTransform

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Base ValueType
Implements
IEquatable<OfficeTransform>
Modifiers sealed

Dependency-free 2D affine transform in a local top-left coordinate space.

Inheritance

  • ValueType
  • OfficeTransform

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters

Constructors

public OfficeTransform(Double m11, Double m12, Double m21, Double m22, Double offsetX, Double offsetY) #

Creates an affine transform.

Parameters

m11 System.Double requiredposition: 0
m12 System.Double requiredposition: 1
m21 System.Double requiredposition: 2
m22 System.Double requiredposition: 3
offsetX System.Double requiredposition: 4
offsetY System.Double requiredposition: 5

Methods

Equals 2 overloads
public virtual Boolean Equals(OfficeTransform other) #
Returns: Boolean

Parameters

other OfficeIMO.Drawing.OfficeTransform requiredposition: 0
public override Boolean Equals(Object obj) #
Returns: Boolean

Parameters

obj System.Object requiredposition: 0
public override Int32 GetHashCode() #
Returns: Int32
public OfficeTransform Invert() #
Returns: OfficeTransform

Returns the inverse transform.

Exceptions

  • InvalidOperationException – Thrown when the transform cannot be inverted.
public static Boolean op_Equality(OfficeTransform left, OfficeTransform right) #
Returns: Boolean

Returns true when two transforms are equal.

Parameters

left OfficeIMO.Drawing.OfficeTransform requiredposition: 0
right OfficeIMO.Drawing.OfficeTransform requiredposition: 1
public static Boolean op_Inequality(OfficeTransform left, OfficeTransform right) #
Returns: Boolean

Returns true when two transforms are not equal.

Parameters

left OfficeIMO.Drawing.OfficeTransform requiredposition: 0
right OfficeIMO.Drawing.OfficeTransform requiredposition: 1
RotateDegrees 2 overloads
public static OfficeTransform RotateDegrees(Double degrees) #
Returns: OfficeTransform

Creates a clockwise rotation transform around the local origin.

Parameters

degrees System.Double requiredposition: 0
public static OfficeTransform RotateDegrees(Double degrees, Double centerX, Double centerY) #
Returns: OfficeTransform

Creates a clockwise rotation transform around a local point.

Parameters

degrees System.Double requiredposition: 0
centerX System.Double requiredposition: 1
centerY System.Double requiredposition: 2
public static OfficeTransform Scale(Double scaleX, Double scaleY) #
Returns: OfficeTransform

Creates a scale transform around the local origin.

Parameters

scaleX System.Double requiredposition: 0
scaleY System.Double requiredposition: 1
public OfficeTransform Then(OfficeTransform next) #
Returns: OfficeTransform

Returns a transform that applies this transform first, then the supplied transform.

Parameters

next OfficeIMO.Drawing.OfficeTransform requiredposition: 0
public OfficePoint TransformPoint(OfficePoint point) #
Returns: OfficePoint

Transforms a point in local top-left coordinates.

Parameters

point OfficeIMO.Drawing.OfficePoint requiredposition: 0
public ValueTuple<Double, Double, Double, Double> TransformRectangleBounds(Double x, Double y, Double width, Double height) #
Returns: ValueTuple<Double, Double, Double, Double>

Calculates axis-aligned bounds for a transformed rectangle.

Parameters

x System.Double requiredposition: 0
Rectangle left coordinate.
y System.Double requiredposition: 1
Rectangle top coordinate.
width System.Double requiredposition: 2
Rectangle width.
height System.Double requiredposition: 3
Rectangle height.

Returns

Axis-aligned bounds of the transformed rectangle.

public static OfficeTransform Translate(Double offsetX, Double offsetY) #
Returns: OfficeTransform

Creates a translation transform.

Parameters

offsetX System.Double requiredposition: 0
offsetY System.Double requiredposition: 1
public Boolean TryInvert(out OfficeTransform inverse) #
Returns: Boolean

Attempts to create the inverse transform.

Parameters

inverse OfficeIMO.Drawing.OfficeTransform@ requiredposition: 0
Inverse transform when inversion succeeds.

Returns

True when the transform has a non-zero determinant.

Properties

public static OfficeTransform Identity { get; } #

Identity transform.

public Double M11 { get; } #

Horizontal scale/rotation component.

public Double M12 { get; } #

Vertical shear/rotation component.

public Double M21 { get; } #

Horizontal shear/rotation component.

public Double M22 { get; } #

Vertical scale/rotation component.

public Double OffsetX { get; } #

Horizontal translation component.

public Double OffsetY { get; } #

Vertical translation component.