OfficeImageSourceCrop
OfficeIMO.Drawing
Describes normalized source-image crop fractions from each image edge.
Inheritance
- ValueType
- OfficeImageSourceCrop
Usage
Explore 4 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
Accepted by parameters 1
- Constructor OfficeImageProjection.OfficeImageProjection
Constructors
public OfficeImageSourceCrop(double left, double top, double right, double bottom) #Creates a source-image crop description from normalized edge fractions.
Parameters
- left double
- top double
- right double
- bottom double
Methods
public static OfficeImageSourceCrop FromClampedFractions(double left, double top, double right, double bottom) #Creates a source crop after clamping each input fraction into the supported normalized range.
Parameters
- left double
- top double
- right double
- bottom double
Returns
OfficeImageSourceCroppublic static OfficeImageSourceCrop FromStrictFractions(double left, double top, double right, double bottom) #Creates a source crop from normalized fractions and rejects crops that collapse the visible source area.
Parameters
- left double
- top double
- right double
- bottom double
Returns
OfficeImageSourceCroppublic static bool LeavesVisibleSourceArea(double left, double top, double right, double bottom) #Returns whether crop fractions leave a non-empty visible source area.
Parameters
- left double
- top double
- right double
- bottom double
Returns
boolpublic ValueTuple<double, double, double, double> ToTuple() #Converts the crop into a tuple.
Returns
ValueTuple<double, double, double, double>Inherited Methods
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 bool HasCrop { get; } #Whether any crop edge is greater than zero.
public bool 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