API Reference
Struct
OfficeImagePlacement
Describes the destination rectangle used when placing an image into a target box.
Inheritance
- ValueType
- OfficeImagePlacement
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
- Property OfficeDrawingTilingPattern.Area
- Method OfficeImagePatternLayout.GetTilePlacements
- Property OfficeImagePatternLayout.Area
- Property OfficeImagePatternLayout.Tile
- Method OfficeImagePlacement.Fit
- Property OfficeImageProjection.Placement
- Property OfficeImageRenderPlan.ImagePlacement
- Property OfficeImageRenderPlan.TargetPlacement
- Property OfficeImageRenderPlan.VisiblePlacement
Accepted by parameters
- Method OfficeDrawing.AddTilingPattern
- Method OfficeDrawing.AddTilingPattern
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Constructor OfficeImagePatternLayout.OfficeImagePatternLayout
- Constructor OfficeImagePatternLayout.OfficeImagePatternLayout
- Constructor OfficeImagePatternLayout.OfficeImagePatternLayout
- Constructor OfficeImagePatternLayout.OfficeImagePatternLayout
- Constructor OfficeImageProjection.OfficeImageProjection
- Method OfficeSvgImageRenderer.AppendImage
- Method OfficeSvgImageRenderer.AppendImageInViewport
- Method OfficeSvgImageRenderer.WriteImage
- Method OfficeSvgImageRenderer.WriteImageInViewport
Constructors
public OfficeImagePlacement(Double x, Double y, Double width, Double height) #Creates a new image placement rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
Methods
public static Boolean ExceedsAspectRatioDistortion(Double sourceWidth, Double sourceHeight, Double targetWidth, Double targetHeight, Double thresholdRatio) #Returns:
BooleanReturns whether a source image would visibly distort when stretched into a target rectangle.
Parameters
- sourceWidth System.Double
- Source image width.
- sourceHeight System.Double
- Source image height.
- targetWidth System.Double
- Target rectangle width.
- targetHeight System.Double
- Target rectangle height.
- thresholdRatio System.Double
- Minimum distortion ratio considered visible. Values below 1 are invalid.
public static OfficeImagePlacement Fit(Double sourceWidth, Double sourceHeight, Double targetX, Double targetY, Double targetWidth, Double targetHeight, OfficeImageFit fit = Stretch) #Returns:
OfficeImagePlacementFits a source image into a target rectangle using the requested image fit mode.
Parameters
- sourceWidth System.Double
- Source image width.
- sourceHeight System.Double
- Source image height.
- targetX System.Double
- Target rectangle left coordinate.
- targetY System.Double
- Target rectangle top coordinate.
- targetWidth System.Double
- Target rectangle width.
- targetHeight System.Double
- Target rectangle height.
- fit OfficeIMO.Drawing.OfficeImageFit = Stretch
- Image fit mode.
Returns
The destination rectangle to render.
public static Double GetAspectRatioDistortionRatio(Double sourceWidth, Double sourceHeight, Double targetWidth, Double targetHeight) #Returns:
DoubleCalculates the visible aspect-ratio change between a source image and a target rectangle.
Parameters
- sourceWidth System.Double
- Source image width.
- sourceHeight System.Double
- Source image height.
- targetWidth System.Double
- Target rectangle width.
- targetHeight System.Double
- Target rectangle height.
Returns
A ratio greater than or equal to 1 where 1 means the source and target aspect ratios match.
public ValueTuple<Double, Double, Double, Double> ToTuple() #Returns:
ValueTuple<Double, Double, Double, Double>Converts the placement into a tuple.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from ValueType
Parameters
- obj Object