Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Struct

OfficeImageRenderPlan

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

Shared fit and source-crop placement plan for rendering an image into a target rectangle.

Inheritance

  • ValueType
  • OfficeImageRenderPlan

Usage

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

Methods

public static OfficeImageRenderPlan CreateBottomLeft(Double sourceWidth, Double sourceHeight, Double targetX, Double targetBottomY, Double targetWidth, Double targetHeight, OfficeImageFit fit = Stretch, OfficeImageSourceCrop sourceCrop = default) #
Returns: OfficeImageRenderPlan

Creates a render plan for coordinate systems where Y grows upward from the bottom edge.

Parameters

sourceWidth System.Double requiredposition: 0
sourceHeight System.Double requiredposition: 1
targetX System.Double requiredposition: 2
targetBottomY System.Double requiredposition: 3
targetWidth System.Double requiredposition: 4
targetHeight System.Double requiredposition: 5
fit OfficeIMO.Drawing.OfficeImageFit = Stretch optionalposition: 6
sourceCrop OfficeIMO.Drawing.OfficeImageSourceCrop = default optionalposition: 7
public static OfficeImageRenderPlan CreateTopLeft(Double sourceWidth, Double sourceHeight, Double targetX, Double targetY, Double targetWidth, Double targetHeight, OfficeImageFit fit = Stretch, OfficeImageSourceCrop sourceCrop = default) #
Returns: OfficeImageRenderPlan

Creates a render plan for coordinate systems where Y grows downward from the top edge.

Parameters

sourceWidth System.Double requiredposition: 0
sourceHeight System.Double requiredposition: 1
targetX System.Double requiredposition: 2
targetY System.Double requiredposition: 3
targetWidth System.Double requiredposition: 4
targetHeight System.Double requiredposition: 5
fit OfficeIMO.Drawing.OfficeImageFit = Stretch optionalposition: 6
sourceCrop OfficeIMO.Drawing.OfficeImageSourceCrop = default optionalposition: 7
public OfficeImageProjection ToVisibleProjection(Double rotationDegrees = 0, Nullable<Double> rotationCenterX = null, Nullable<Double> rotationCenterY = null, Boolean flipHorizontal = false, Boolean flipVertical = false) #
Returns: OfficeImageProjection

Returns a visible-placement projection suitable for top-left SVG and raster renderers.

Parameters

rotationDegrees System.Double = 0 optionalposition: 0
rotationCenterX System.Nullable{System.Double} = null optionalposition: 1
rotationCenterY System.Nullable{System.Double} = null optionalposition: 2
flipHorizontal System.Boolean = false optionalposition: 3
flipVertical System.Boolean = false optionalposition: 4

Properties

public OfficeImagePlacement TargetPlacement { get; } #

Original target rectangle requested by the caller.

public OfficeImagePlacement VisiblePlacement { get; } #

Rectangle occupied by the visible image content after fit and source crop are applied.

public OfficeImagePlacement ImagePlacement { get; } #

Rectangle used to draw the underlying full image before source-crop clipping.

public OfficeImageSourceCrop SourceCrop { get; } #

Source-image crop fractions used by the plan.

public OfficeImageFit Fit { get; } #

Requested image fit mode.

public Boolean RequiresTargetClip { get; } #

Whether the rendered image must be clipped to TargetPlacement.