Class BinaryPartAbstractImage.CxCy
java.lang.Object
org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.CxCy
- Enclosing class:
- BinaryPartAbstractImage
public static class BinaryPartAbstractImage.CxCy
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description longgetCx()longgetCy()booleanisScaled()static BinaryPartAbstractImage.CxCyscale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, double xEmu, double yEmu)static BinaryPartAbstractImage.CxCyscale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, PageDimensions page)static BinaryPartAbstractImage.CxCyscale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, PageDimensions page, int maxWidth)Return scaling values constrained by specified maxWidth.static BinaryPartAbstractImage.CxCyscale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, Presentation.SldSz sldSz)static BinaryPartAbstractImage.CxCyscaleToFit(double iwEmu, double ihEmu, double swEmu, double shEmu)
-
Method Details
-
getCx
public long getCx()- Returns:
- the resulting cx
-
getCy
public long getCy()- Returns:
- the resulting cy
-
isScaled
public boolean isScaled()- Returns:
- whether it was necessary to scale the image to fit the page width
-
scale
public static BinaryPartAbstractImage.CxCy scale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, PageDimensions page) -
scale
public static BinaryPartAbstractImage.CxCy scale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, PageDimensions page, int maxWidth)Return scaling values constrained by specified maxWidth. Useful if the image is to be inserted into a table cell of known width.- Parameters:
imageInfo-page-maxWidth-- Returns:
- Since:
- 3.3.0
-
scale
public static BinaryPartAbstractImage.CxCy scale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, Presentation.SldSz sldSz) -
scale
public static BinaryPartAbstractImage.CxCy scale(org.apache.xmlgraphics.image.loader.ImageInfo imageInfo, double xEmu, double yEmu) -
scaleToFit
public static BinaryPartAbstractImage.CxCy scaleToFit(double iwEmu, double ihEmu, double swEmu, double shEmu)- Parameters:
iwEmu- image width in EMUihEmu- image height in EMUswEmu- slide width in EMUshEmu- slide height in EMU- Returns:
-