Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Struct

OfficeImageProjection

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Base ValueType
Modifiers sealed

Describes a projected image render operation shared by raster and SVG renderers.

Inheritance

  • ValueType
  • OfficeImageProjection

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 OfficeImageProjection(OfficeImagePlacement placement, OfficeImageSourceCrop sourceCrop = default, Double rotationDegrees = 0, Nullable<Double> rotationCenterX = null, Nullable<Double> rotationCenterY = null, Boolean flipHorizontal = false, Boolean flipVertical = false) #

Creates an image projection from destination placement, source crop, and transform settings.

Parameters

placement OfficeIMO.Drawing.OfficeImagePlacement requiredposition: 0
Destination placement rectangle.
sourceCrop OfficeIMO.Drawing.OfficeImageSourceCrop = default optionalposition: 1
Normalized source crop fractions.
rotationDegrees System.Double = 0 optionalposition: 2
Clockwise rotation in degrees.
rotationCenterX System.Nullable{System.Double} = null optionalposition: 3
Optional rotation center X coordinate. Defaults to destination center.
rotationCenterY System.Nullable{System.Double} = null optionalposition: 4
Optional rotation center Y coordinate. Defaults to destination center.
flipHorizontal System.Boolean = false optionalposition: 5
Whether to mirror horizontally around the rotation center.
flipVertical System.Boolean = false optionalposition: 6
Whether to mirror vertically around the rotation center.

Methods

public OfficeImageFrameTransform CreateFrameTransform() #
Returns: OfficeImageFrameTransform

Creates a destination-space frame transform for this projection's rotation and mirror settings.

Returns

A shared frame transform that can be converted to format-specific transform syntax or matrices.

public OfficeTransform CreateUnitSquareTransform() #
Returns: OfficeTransform

Creates an affine transform that maps a unit image rectangle into this projection's destination placement.

public ValueTuple<Double, Double, Double, Double> GetDestinationBounds() #
Returns: ValueTuple<Double, Double, Double, Double>

Calculates axis-aligned destination bounds after applying this projection's rotation and mirror settings.

Returns

Projected destination bounds.

public OfficeImageProjection Scale(Double scale) #
Returns: OfficeImageProjection

Returns a projection scaled by the supplied output factor.

Parameters

scale System.Double requiredposition: 0
Positive scale factor.

Returns

A scaled projection with source crop and transform flags preserved.

public ValueTuple<Double, Double, Double, Double, Double, Double, Double, ValueTuple<Double, Double, Double, Double, Boolean, Boolean>> ToTuple() #
Returns: ValueTuple<Double, Double, Double, Double, Double, Double, Double, ValueTuple<Double, Double, Double, Double, Boolean, Boolean>>

Converts the projection into a tuple useful for assertions and diagnostics.

public OfficeImageProjection Translate(Double offsetX, Double offsetY) #
Returns: OfficeImageProjection

Returns a projection translated by the supplied destination offset.

Parameters

offsetX System.Double requiredposition: 0
Horizontal destination offset.
offsetY System.Double requiredposition: 1
Vertical destination offset.

Returns

A translated projection with source crop and transform flags preserved.

Properties

public OfficeImagePlacement Placement { get; } #

Destination placement rectangle.

public OfficeImageSourceCrop SourceCrop { get; } #

Normalized source crop fractions.

public Double RotationDegrees { get; } #

Clockwise rotation in degrees.

public Double RotationCenterX { get; } #

Rotation and flip center X coordinate.

public Double RotationCenterY { get; } #

Rotation and flip center Y coordinate.

public Boolean FlipHorizontal { get; } #

Whether to mirror horizontally around the rotation center.

public Boolean FlipVertical { get; } #

Whether to mirror vertically around the rotation center.

public Double X { get; } #

Destination left coordinate.

public Double Y { get; } #

Destination top coordinate.

public Double Width { get; } #

Destination width.

public Double Height { get; } #

Destination height.

public Double SourceLeft { get; } #

Normalized visible source left coordinate.

public Double SourceTop { get; } #

Normalized visible source top coordinate.

public Double SourceWidth { get; } #

Normalized visible source width.

public Double SourceHeight { get; } #

Normalized visible source height.

public Boolean HasCrop { get; } #

Whether the source image is cropped.

public Boolean HasRotation { get; } #

Whether the projection applies rotation.

public Boolean HasTransform { get; } #

Whether the projection applies rotation or flipping.