API Reference
OfficeImageSourceCrop
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.
Returned or exposed by
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
- top System.Double
- right System.Double
- bottom System.Double
Methods
public static OfficeImageSourceCrop FromClampedFractions(Double left, Double top, Double right, Double bottom) #OfficeImageSourceCropCreates a source crop after clamping each input fraction into the supported normalized range.
Parameters
- left System.Double
- top System.Double
- right System.Double
- bottom System.Double
public static OfficeImageSourceCrop FromStrictFractions(Double left, Double top, Double right, Double bottom) #OfficeImageSourceCropCreates a source crop from normalized fractions and rejects crops that collapse the visible source area.
Parameters
- left System.Double
- top System.Double
- right System.Double
- bottom System.Double
public static Boolean LeavesVisibleSourceArea(Double left, Double top, Double right, Double bottom) #BooleanReturns whether crop fractions leave a non-empty visible source area.
Parameters
- left System.Double
- top System.Double
- right System.Double
- bottom System.Double
public ValueTuple<Double, Double, Double, Double> ToTuple() #ValueTuple<Double, Double, Double, Double>Converts the crop into a tuple.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.
0.001