API Reference
OfficeImageProjection
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.
Returned or exposed by
Accepted by parameters
- Method OfficeDrawing.AddClippedImage
- Method OfficeDrawing.AddClippedImageWithInterpolation
- Method OfficeDrawing.AddImage
- Method OfficeDrawing.AddImageBehindContent
- Method OfficeDrawing.AddImageWithInterpolation
- Constructor OfficeDrawingImage.OfficeDrawingImage
- Method OfficeDrawingImage.CreateWithInterpolation
- Method OfficeRasterCanvas.DrawImage
- Method OfficeRasterCanvas.DrawImage
- Method OfficeSvgImageRenderer.AppendImage
- Method OfficeSvgImageRenderer.AppendImageInViewport
- Method OfficeSvgImageRenderer.WriteImage
- Method OfficeSvgImageRenderer.WriteImageInViewport
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
- Destination placement rectangle.
- sourceCrop OfficeIMO.Drawing.OfficeImageSourceCrop = default
- Normalized source crop fractions.
- rotationDegrees System.Double = 0
- Clockwise rotation in degrees.
- rotationCenterX System.Nullable{System.Double} = null
- Optional rotation center X coordinate. Defaults to destination center.
- rotationCenterY System.Nullable{System.Double} = null
- Optional rotation center Y coordinate. Defaults to destination center.
- flipHorizontal System.Boolean = false
- Whether to mirror horizontally around the rotation center.
- flipVertical System.Boolean = false
- Whether to mirror vertically around the rotation center.
Methods
public OfficeImageFrameTransform CreateFrameTransform() #OfficeImageFrameTransformCreates 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() #OfficeTransformCreates an affine transform that maps a unit image rectangle into this projection's destination placement.
public ValueTuple<Double, Double, Double, Double> GetDestinationBounds() #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) #OfficeImageProjectionReturns a projection scaled by the supplied output factor.
Parameters
- scale System.Double
- 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() #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) #OfficeImageProjectionReturns a projection translated by the supplied destination offset.
Parameters
- offsetX System.Double
- Horizontal destination offset.
- offsetY System.Double
- Vertical destination offset.
Returns
A translated projection with source crop and transform flags preserved.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.