Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Struct

OfficeImageSourceCrop

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

Describes normalized source-image crop fractions from each image edge.

Inheritance

  • ValueType
  • OfficeImageSourceCrop

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 OfficeImageSourceCrop(Double left, Double top, Double right, Double bottom) #

Creates a source-image crop description from normalized edge fractions.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3

Methods

public static OfficeImageSourceCrop FromClampedFractions(Double left, Double top, Double right, Double bottom) #
Returns: OfficeImageSourceCrop

Creates a source crop after clamping each input fraction into the supported normalized range.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3
public static OfficeImageSourceCrop FromStrictFractions(Double left, Double top, Double right, Double bottom) #
Returns: OfficeImageSourceCrop

Creates a source crop from normalized fractions and rejects crops that collapse the visible source area.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3
public static Boolean LeavesVisibleSourceArea(Double left, Double top, Double right, Double bottom) #
Returns: Boolean

Returns whether crop fractions leave a non-empty visible source area.

Parameters

left System.Double requiredposition: 0
top System.Double requiredposition: 1
right System.Double requiredposition: 2
bottom System.Double requiredposition: 3
public ValueTuple<Double, Double, Double, Double> ToTuple() #
Returns: ValueTuple<Double, Double, Double, Double>

Converts the crop into a tuple.

Properties

public Double Left { get; } #

Fraction cropped from the left edge of the source image.

public Double Top { get; } #

Fraction cropped from the top edge of the source image.

public Double Right { get; } #

Fraction cropped from the right edge of the source image.

public Double Bottom { get; } #

Fraction cropped from the bottom edge of the source image.

public Boolean HasCrop { get; } #

Whether any crop edge is greater than zero.

public Boolean HasVisibleSourceArea { get; } #

Whether the crop leaves a non-empty source area without requiring fallback clamping.

public Double VisibleWidth { get; } #

Visible width ratio after applying left and right crop fractions.

public Double VisibleHeight { get; } #

Visible height ratio after applying top and bottom crop fractions.

Fields

public const Double MinimumVisibleRatio #

Smallest visible source ratio used when authored crop edges collapse the source area.

Value: 0.001