OfficeTransform
OfficeIMO.Drawing
Dependency-free 2D affine transform in a local top-left coordinate space.
Inheritance
- ValueType
- OfficeTransform
Usage
Explore 39 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 17
- Property OfficeDrawingEffectGroup.Transform
- Property OfficeDrawingSoftMask.Transform
- Method OfficeDrawingTilingPattern.GetTileTransforms
- Property OfficeDrawingTilingPattern.Transform
- Method OfficeImageFrameTransform.CreateDestinationTransform
- Method OfficeImageProjection.CreateUnitSquareTransform
- Property OfficeInkStroke.Transform
- Property OfficeRadialGradient.CoordinateTransform
- Property OfficeScanProcessingReport.ProcessedToSource
- Property OfficeScanProcessingReport.SourceToProcessed
- Property OfficeShape.Transform
- Method OfficeTransform.Invert
- Method OfficeTransform.RotateDegrees
- Method OfficeTransform.Scale
- Method OfficeTransform.Then
- Method OfficeTransform.Translate
- Property OfficeTransform.Identity
Accepted by parameters 22
- Method OfficeDrawing.AddBorderBox
- Method OfficeDrawing.AddEffectDrawing
- Method OfficeDrawing.AddTilingPattern
- Constructor OfficeDrawingEffectGroup.OfficeDrawingEffectGroup
- Constructor OfficeDrawingSoftMask.OfficeDrawingSoftMask
- Method OfficeDrawingSoftMask.CreateWithLuminosityStandard
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Method OfficeInkPoint.Transform
- Method OfficeLinearGradient.FromTransformedAngle
- Method OfficeRadialGradient.TransformCoordinates
- Method OfficeRasterCanvas.DrawAffineImage
- Method OfficeRasterCanvas.DrawTextLineTransformed
- Method OfficeRasterResampler.Transform
- Method OfficeSvgFormatting.AppendMatrixTransformAttribute
- Method OfficeSvgFormatting.FormatMatrixTransform
- Method OfficeTransform.Equals
- Method OfficeTransform.op_Equality
- Method OfficeTransform.op_Equality
- Method OfficeTransform.op_Inequality
- Method OfficeTransform.op_Inequality
- Method OfficeTransform.Then
- Method OfficeTransform.TryInvert
Constructors
public OfficeTransform(double m11, double m12, double m21, double m22, double offsetX, double offsetY) #Creates an affine transform.
Parameters
- m11 double
- m12 double
- m21 double
- m22 double
- offsetX double
- offsetY double
Methods
public bool Equals(OfficeTransform other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.Drawing.OfficeTransform
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj) #Indicates whether this instance and a specified object are equal.
Parameters
- obj object?
- The object to compare with the current instance.
Returns
bool true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode() #Returns the hash code for this instance.
Returns
int A 32-bit signed integer that is the hash code for this instance.public OfficeTransform Invert() #Returns the inverse transform.
Returns
OfficeTransformExceptions
InvalidOperationException– Thrown when the transform cannot be inverted.
public static bool op_Equality(OfficeTransform left, OfficeTransform right) #Returns true when two transforms are equal.
Parameters
- left OfficeIMO.Drawing.OfficeTransform
- right OfficeIMO.Drawing.OfficeTransform
Returns
boolpublic static bool op_Inequality(OfficeTransform left, OfficeTransform right) #Returns true when two transforms are not equal.
Parameters
- left OfficeIMO.Drawing.OfficeTransform
- right OfficeIMO.Drawing.OfficeTransform
Returns
boolpublic static OfficeTransform RotateDegrees(double degrees) #Creates a clockwise rotation transform around the local origin.
Parameters
- degrees double
Returns
OfficeTransformpublic static OfficeTransform RotateDegrees(double degrees, double centerX, double centerY) #Creates a clockwise rotation transform around a local point.
Parameters
- degrees double
- centerX double
- centerY double
Returns
OfficeTransformpublic static OfficeTransform Scale(double scaleX, double scaleY) #Creates a scale transform around the local origin.
Parameters
- scaleX double
- scaleY double
Returns
OfficeTransformpublic OfficeTransform Then(OfficeTransform next) #Returns a transform that applies this transform first, then the supplied transform.
Parameters
- next OfficeIMO.Drawing.OfficeTransform
Returns
OfficeTransformpublic OfficePoint TransformPoint(OfficePoint point) #Transforms a point in local top-left coordinates.
Parameters
- point OfficeIMO.Drawing.OfficePoint
Returns
OfficePointpublic ValueTuple<double, double, double, double> TransformRectangleBounds(double x, double y, double width, double height) #Calculates axis-aligned bounds for a transformed rectangle.
Parameters
- x double
- Rectangle left coordinate.
- y double
- Rectangle top coordinate.
- width double
- Rectangle width.
- height double
- Rectangle height.
Returns
ValueTuple<double, double, double, double> Axis-aligned bounds of the transformed rectangle.public static OfficeTransform Translate(double offsetX, double offsetY) #Creates a translation transform.
Parameters
- offsetX double
- offsetY double
Returns
OfficeTransformpublic bool TryInvert(out OfficeTransform inverse) #Attempts to create the inverse transform.
Parameters
- inverse OfficeIMO.Drawing.OfficeTransform
- Inverse transform when inversion succeeds.
Returns
bool True when the transform has a non-zero determinant.