OfficeImageProjection
OfficeIMO.Drawing
Describes a projected image render operation shared by raster and SVG renderers.
Inheritance
- ValueType
- OfficeImageProjection
Usage
Explore 11 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 3
- Property OfficeDrawingImage.Projection
- Method OfficeImageProjection.Scale
- Method OfficeImageProjection.Translate
Accepted by parameters 8
- Method OfficeDrawing.AddClippedImage
- Method OfficeDrawing.AddClippedImageWithInterpolation
- Method OfficeDrawing.AddImage
- Method OfficeDrawing.AddImageBehindContent
- Method OfficeDrawing.AddImageWithInterpolation
- Constructor OfficeDrawingImage.OfficeDrawingImage
- Method OfficeDrawingImage.CreateWithInterpolation
- Method OfficeRasterCanvas.DrawImage
Constructors
public OfficeImageProjection(OfficeImagePlacement placement, OfficeImageSourceCrop sourceCrop = default, double rotationDegrees = 0, double? rotationCenterX = null, double? rotationCenterY = null, bool flipHorizontal = false, bool 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 double = 0
- Clockwise rotation in degrees.
- rotationCenterX double? = null
- Optional rotation center X coordinate. Defaults to destination center.
- rotationCenterY double? = null
- Optional rotation center Y coordinate. Defaults to destination center.
- flipHorizontal bool = false
- Whether to mirror horizontally around the rotation center.
- flipVertical bool = false
- Whether to mirror vertically around the rotation center.
Methods
public OfficeImageFrameTransform CreateFrameTransform() #Creates a destination-space frame transform for this projection's rotation and mirror settings.
Returns
OfficeImageFrameTransform A shared frame transform that can be converted to format-specific transform syntax or matrices.public OfficeTransform CreateUnitSquareTransform() #Creates an affine transform that maps a unit image rectangle into this projection's destination placement.
Returns
OfficeTransformpublic ValueTuple<double, double, double, double> GetDestinationBounds() #Calculates axis-aligned destination bounds after applying this projection's rotation and mirror settings.
Returns
ValueTuple<double, double, double, double> Projected destination bounds.public OfficeImageProjection Scale(double scale) #Returns a projection scaled by the supplied output factor.
Parameters
- scale double
- Positive scale factor.
public ValueTuple<double, double, double, double, double, double, double, ValueTuple<double, double, double, double, bool, bool>> ToTuple() #Converts the projection into a tuple useful for assertions and diagnostics.
Returns
ValueTuple<double, double, double, double, double, double, double, ValueTuple<double, double, double, double, bool, bool>>public OfficeImageProjection Translate(double offsetX, double offsetY) #Returns a projection translated by the supplied destination offset.
Parameters
- offsetX double
- Horizontal destination offset.
- offsetY double
- Vertical destination offset.
Returns
OfficeImageProjection A translated projection with source crop and transform flags preserved.Inherited Methods
Properties
public OfficeImagePlacement Placement { get; } #Destination placement rectangle.
public OfficeImageSourceCrop SourceCrop { get; } #Normalized source crop fractions.
public double RotationCenterX { get; } #Rotation and flip center X coordinate.
public double RotationCenterY { get; } #Rotation and flip center Y coordinate.
public bool FlipHorizontal { get; } #Whether to mirror horizontally around the rotation center.
public bool FlipVertical { get; } #Whether to mirror vertically around the rotation center.
public double SourceLeft { get; } #Normalized visible source left coordinate.
public double SourceTop { get; } #Normalized visible source top coordinate.
public bool HasRotation { get; } #Whether the projection applies rotation.
public bool HasTransform { get; } #Whether the projection applies rotation or flipping.