public class CImage extends CAbstractElement
elementPtr| Constructor and Description |
|---|
CImage(long ptr)
Create an image element with native pointer.
|
| Modifier and Type | Method and Description |
|---|---|
CUnitValue |
getHeight()
Get height of this image element.
|
float |
getImageHeight()
Get the intrinsic image height (before scaling).
|
float |
getImageScaledHeight()
Get scaled image height.
|
float |
getImageScaledWidth()
Get scaled image width.
|
float |
getImageWidth()
Get the intrinsic image width (before scaling).
|
CUnitValue |
getMarginBottom()
Get bottom margin.
|
CUnitValue |
getMarginLeft()
Get left margin.
|
CUnitValue |
getMarginRight()
Get right margin.
|
CUnitValue |
getMarginTop()
Get top margin.
|
CUnitValue |
getPaddingBottom()
Get bottom padding.
|
CUnitValue |
getPaddingLeft()
Get left padding.
|
CUnitValue |
getPaddingRight()
Get right padding.
|
CUnitValue |
getPaddingTop()
Get top padding.
|
CElementType |
getType()
Get element type.
|
CUnitValue |
getWidth()
Get width of this image element.
|
void |
scale(float horizontalScale,
float verticalScale)
Scale the image element by the specified factors.
|
void |
scaleAbsolute(float fitWidth,
float fitHeight)
Scale the image using absolute sizing to fit within a bounding box (implementation-defined behavior).
|
void |
scaleToFit(float fitWidth,
float fitHeight)
Scale the image to fit within a bounding box (implementation-defined behavior).
|
void |
setAbsolutePosition(float left,
float bottom)
Set absolute position for this image element.
|
void |
setAutoScale(boolean autoScale)
Enable/disable auto scaling.
|
void |
setAutoScaleHeight(boolean autoScale)
Enable/disable auto scaling based on height.
|
void |
setAutoScaleWidth(boolean autoScale)
Enable/disable auto scaling based on width.
|
void |
setHeight(CUnitValue height)
Set image element height with unit value.
|
void |
setHeight(float height)
Set image element height in points.
|
void |
setMargin(float margin)
Set all margins using the same value.
|
void |
setMarginBottom(float marginBottom)
Set bottom margin.
|
void |
setMarginLeft(float marginLeft)
Set left margin.
|
void |
setMarginRight(float marginRight)
Set right margin.
|
void |
setMargins(float marginTop,
float marginRight,
float marginBottom,
float marginLeft)
Set margins for each side.
|
void |
setMarginTop(float marginTop)
Set top margin.
|
void |
setMaxHeight(CUnitValue maxHeight)
Set maximum height with unit value.
|
void |
setMaxHeight(float maxHeight)
Set maximum height in points.
|
void |
setMaxWidth(CUnitValue maxWidth)
Set maximum width with unit value.
|
void |
setMaxWidth(float maxWidth)
Set maximum width in points.
|
void |
setMinHeight(CUnitValue minHeight)
Set minimum height with unit value.
|
void |
setMinHeight(float minHeight)
Set minimum height in points.
|
void |
setMinWidth(CUnitValue minWidth)
Set minimum width with unit value.
|
void |
setMinWidth(float minWidth)
Set minimum width in points.
|
void |
setPadding(float padding)
Set all paddings using the same value.
|
void |
setPaddingBottom(float paddingBottom)
Set bottom padding.
|
void |
setPaddingLeft(float paddingLeft)
Set left padding.
|
void |
setPaddingRight(float paddingRight)
Set right padding.
|
void |
setPaddings(float paddingTop,
float paddingRight,
float paddingBottom,
float paddingLeft)
Set paddings for each side.
|
void |
setPaddingTop(float paddingTop)
Set top padding.
|
void |
setWidth(CUnitValue width)
Set image element width with unit value.
|
void |
setWidth(float width)
Set image element width in points.
|
addStyle, getChildren, getStyles, hasProperty, isAbsolute, isEmptydeleteProperty, getProperties, getStrokeColor, getStrokeWidth, hasProperty, setAbsolutePosition, setAbsolutePosition, setBackgroundColor, setBackgroundImage, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setFontColor, setFontFamily, setFontSize, setFontStyle, setFontWeight, setHorizontalAlignment, setInlineVerticalAlignment, setOpacity, setStrokeColor, setStrokeWidth, setTextAlignment, setUnderline, setWordSpacingpublic CImage(long ptr)
ptr - Native image pointer/handle.public CElementType getType()
CElementType.ELEMENT_IMAGE.public void setAbsolutePosition(float left,
float bottom)
left - Left position.bottom - Bottom position.public void setMarginLeft(float marginLeft)
marginLeft - Left margin value.public void setMarginRight(float marginRight)
marginRight - Right margin value.public void setMarginTop(float marginTop)
marginTop - Top margin value.public void setMarginBottom(float marginBottom)
marginBottom - Bottom margin value.public void setMargin(float margin)
margin - Margin value applied to all sides.public void setMargins(float marginTop,
float marginRight,
float marginBottom,
float marginLeft)
marginTop - Top margin.marginRight - Right margin.marginBottom - Bottom margin.marginLeft - Left margin.public CUnitValue getMarginLeft()
CUnitValue.public CUnitValue getMarginRight()
CUnitValue.public CUnitValue getMarginTop()
CUnitValue.public CUnitValue getMarginBottom()
CUnitValue.public void setPaddingLeft(float paddingLeft)
paddingLeft - Left padding value.public void setPaddingRight(float paddingRight)
paddingRight - Right padding value.public void setPaddingTop(float paddingTop)
paddingTop - Top padding value.public void setPaddingBottom(float paddingBottom)
paddingBottom - Bottom padding value.public void setPadding(float padding)
padding - Padding value applied to all sides.public void setPaddings(float paddingTop,
float paddingRight,
float paddingBottom,
float paddingLeft)
paddingTop - Top padding.paddingRight - Right padding.paddingBottom - Bottom padding.paddingLeft - Left padding.public CUnitValue getPaddingLeft()
CUnitValue.public CUnitValue getPaddingRight()
CUnitValue.public CUnitValue getPaddingTop()
CUnitValue.public CUnitValue getPaddingBottom()
CUnitValue.public void scale(float horizontalScale,
float verticalScale)
horizontalScale - Horizontal scale factor.verticalScale - Vertical scale factor.public void scaleToFit(float fitWidth,
float fitHeight)
fitWidth - Target fit width.fitHeight - Target fit height.public void scaleAbsolute(float fitWidth,
float fitHeight)
fitWidth - Target fit width.fitHeight - Target fit height.public void setAutoScale(boolean autoScale)
autoScale - true to enable auto scaling, false to disable.public void setAutoScaleHeight(boolean autoScale)
autoScale - true to enable, false to disable.public void setAutoScaleWidth(boolean autoScale)
autoScale - true to enable, false to disable.public float getImageScaledHeight()
public float getImageScaledWidth()
public void setWidth(float width)
width - Width value in points.public void setHeight(float height)
height - Height value in points.public void setWidth(CUnitValue width)
width - Width as CUnitValue.public void setHeight(CUnitValue height)
height - Height as CUnitValue.public CUnitValue getWidth()
CUnitValue.public CUnitValue getHeight()
CUnitValue.public void setMaxWidth(float maxWidth)
maxWidth - Maximum width value in points.public void setMaxWidth(CUnitValue maxWidth)
maxWidth - Maximum width as CUnitValue.public void setMinWidth(float minWidth)
minWidth - Minimum width value in points.public void setMinWidth(CUnitValue minWidth)
minWidth - Minimum width as CUnitValue.public void setMaxHeight(float maxHeight)
maxHeight - Maximum height value in points.public void setMaxHeight(CUnitValue maxHeight)
maxHeight - Maximum height as CUnitValue.public void setMinHeight(float minHeight)
minHeight - Minimum height value in points.public void setMinHeight(CUnitValue minHeight)
minHeight - Minimum height as CUnitValue.public float getImageWidth()
public float getImageHeight()