|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.spire.doc.OwnerHolder
com.spire.doc.documents.xml.DocumentSerializable
com.spire.doc.DocumentObject
com.spire.doc.DocumentBase
com.spire.doc.fields.ParagraphBase
com.spire.doc.fields.shape.ShapeBase
com.spire.doc.fields.ShapeObject
com.spire.doc.fields.DocPicture
public class DocPicture
| Constructor Summary | |
|---|---|
DocPicture(IDocument doc)
Initializes a new instance of the DocPicture class. |
|
| Method Summary | |
|---|---|
IParagraph |
addCaption(java.lang.String name,
CaptionNumberingFormat format,
CaptionPosition captionPosition)
Add Caption for current Picture. |
java.lang.String |
getAlternativeText()
Gets the alternative text. |
boolean |
getBiLevel()
Gets whether an image will be displayed in black and white. |
float |
getBrightness()
Gets picture brightness. |
CharacterFormat |
getCharacterFormat()
Gets shape object's character format. |
PictureColor |
getColor()
Get picture color. |
float |
getContrast()
Get picture contrast. |
DocumentObjectType |
getDocumentObjectType()
Gets the type of the document object. |
boolean |
getGrayScale()
Gets whether a picture will display in grayscale mode. |
float |
getHeight()
Returns picture height. |
float |
getHeightScale()
Returns picture height scale factor in percent. |
ShapeHorizontalAlignment |
getHorizontalAlignment()
Returns picture horizontal alignment. |
HorizontalOrigin |
getHorizontalOrigin()
Gets horizontal origin of the picture. |
float |
getHorizontalPosition()
Gets absolute horizontal position of the picture. |
java.awt.image.BufferedImage |
getImage()
Gets internal Image object. |
byte[] |
getImageBytes()
Gets image byte array. |
boolean |
getLayoutInCell()
Gets the boolean value that represents whether a picture in a table is displayed inside or outside the table. |
float |
getRotationEx()
Gets the rotation of DocPicture.Specifies the rotation of the graphic frame. |
TextWrappingStyle |
getTextWrappingStyle()
Gets text wrapping style of the picture. |
TextWrappingType |
getTextWrappingType()
Gets text wrapping type of the picture. |
java.lang.String |
getTitle()
Gets the picture title. |
java.awt.Color |
getTransparentColor()
Gets transparent color |
ShapeVerticalAlignment |
getVerticalAlignment()
Returns picture vertical alignment. |
VerticalOrigin |
getVerticalOrigin()
Gets absolute horizontal position of the picture. |
float |
getVerticalPosition()
Gets absolute vertical position of the picture. |
float |
getWidth()
Returns picture width. |
float |
getWidthScale()
Returns picture width scale factor in percent. |
boolean |
isCrop()
Gets whether the picture object is cropped. |
boolean |
isUnderText()
Gets whether picture is below image. |
void |
isUnderText(boolean value)
Sets whether picture is below image. |
void |
loadImage(byte[] imageBytes)
Loads image as bytes array. |
void |
loadImage(java.io.InputStream inputStream)
Loads image. |
void |
loadImage(java.lang.String filePath)
Loads image. |
void |
replaceImage(byte[] imageBytes,
boolean bIsKeepRation)
Replaces the image. |
void |
setAlternativeText(java.lang.String value)
Sets the alternative text. |
void |
setBiLevel(boolean value)
Sets whether an image will be displayed in black and white. |
void |
setBrightness(float value)
Sets picture brightness. |
void |
setColor(PictureColor value)
set picture color. |
void |
setContrast(float value)
Set picture contrast. |
void |
setGrayScale(boolean value)
Sets whether a picture will display in grayscale mode. |
void |
setHeight(float value)
Sets picture height. |
void |
setHeightScale(float value)
Sets picture height scale factor in percent. |
void |
setHorizontalAlignment(ShapeHorizontalAlignment value)
Sets picture horizontal alignment. |
void |
setHorizontalOrigin(HorizontalOrigin value)
Sets horizontal origin of the picture. |
void |
setHorizontalPosition(float value)
Sets absolute horizontal position of the picture. |
void |
setLayoutInCell(boolean value)
Sets the boolean value that represents whether a picture in a table is displayed inside or outside the table. |
void |
setRotationEx(float value)
Sets the rotation of DocPicture.Specifies the rotation of the graphic frame. |
void |
setTextWrappingStyle(TextWrappingStyle value)
Sets text wrapping style of the picture. |
void |
setTextWrappingType(TextWrappingType value)
Sets text wrapping type of the picture. |
void |
setTitle(java.lang.String value)
Sets the picture title. |
void |
setTransparentColor(java.awt.Color value)
Sets transparent color |
void |
setVerticalAlignment(ShapeVerticalAlignment value)
Sets picture vertical alignment. |
void |
setVerticalOrigin(VerticalOrigin value)
Sets absolute horizontal position of the picture. |
void |
setVerticalPosition(float value)
Sets absolute vertical position of the picture. |
void |
setWidth(float value)
Sets picture width. |
void |
setWidthScale(float value)
Sets picture width scale factor in percent. |
| Methods inherited from class com.spire.doc.fields.ShapeObject |
|---|
getChildObjects, getFillColor, getLineStyle, getStrokeColor, getStrokeWeight, getWordArt, hasImage, setFillColor, setLineStyle, setStrokeColor, setStrokeWeight |
| Methods inherited from class com.spire.doc.fields.shape.ShapeBase |
|---|
getAllowOverlap, getBehindText, getBottom, getDistanceBottom, getDistanceLeft, getDistanceRight, getDistanceTop, getParentParagraph, getRight, getRotation, getShapeType, getZOrder, hasKey, isImage, localToParent, removeShapeAttribute, setAllowOverlap, setBehindText, setDistanceBottom, setDistanceLeft, setDistanceRight, setDistanceTop, setRotation, setShapeAttr, setShapeAttribute, setShapeType, setZOrder |
| Methods inherited from class com.spire.doc.fields.ParagraphBase |
|---|
applyCharacterFormat, applyStyle, getAncestor, getOwnerParagraph, getStyleName, isDeleteRevision, isInsertRevision |
| Methods inherited from class com.spire.doc.DocumentObject |
|---|
deepClone, getFirstChild, getLastChild, getNextSibling, getOwner, getPreviousSibling, isComposite, toString |
| Methods inherited from class com.spire.doc.OwnerHolder |
|---|
getDocument |
| Methods inherited from interface com.spire.doc.interfaces.IParagraphBase |
|---|
applyStyle, getOwnerParagraph, getStyleName |
| Methods inherited from interface com.spire.doc.interfaces.IDocumentObject |
|---|
deepClone, getDocument, getNextSibling, getOwner, getPreviousSibling, isComposite |
| Methods inherited from interface com.spire.doc.documents.IRunAttrSource |
|---|
clearRunAttrs, fetchInheritedRunAttr, getDirectRunAttr, getDirectRunAttrByIndex, getDirectRunAttrsCount, setRunAttr |
| Constructor Detail |
|---|
public DocPicture(IDocument doc)
DocPicture class.
doc - the doc.| Method Detail |
|---|
public float getRotationEx()
public void setRotationEx(float value)
value - floatpublic DocumentObjectType getDocumentObjectType()
getDocumentObjectType in interface IDocumentObjectgetDocumentObjectType in class ShapeObjectpublic float getHeight()
getHeight in interface IPicturegetHeight in class ShapeBasepublic void setHeight(float value)
setHeight in interface IPicturesetHeight in class ShapeBasevalue - the value is measured in points.public float getWidth()
getWidth in interface IPicturegetWidth in class ShapeBasepublic void setWidth(float value)
setWidth in interface IPicturesetWidth in class ShapeBasevalue - the value is measured in points.public float getHeightScale()
getHeightScale in interface IPicturepublic void setHeightScale(float value)
setHeightScale in interface IPicturevalue - floatpublic float getWidthScale()
getWidthScale in interface IPicturepublic void setWidthScale(float value)
setWidthScale in interface IPicturevalue - floatpublic java.awt.image.BufferedImage getImage()
getImage in interface IPicturepublic byte[] getImageBytes()
getImageBytes in interface IPicturepublic boolean getGrayScale()
public void setGrayScale(boolean value)
value - booleanpublic boolean getBiLevel()
public void setBiLevel(boolean value)
value - booleanpublic float getBrightness()
public void setBrightness(float value)
value - floatpublic float getContrast()
public void setContrast(float value)
value - floatpublic PictureColor getColor()
public void setColor(PictureColor value)
value - PictureColorpublic java.awt.Color getTransparentColor()
public void setTransparentColor(java.awt.Color value)
value - Colorpublic boolean isCrop()
public HorizontalOrigin getHorizontalOrigin()
getHorizontalOrigin in interface IPicturegetHorizontalOrigin in class ShapeBasepublic void setHorizontalOrigin(HorizontalOrigin value)
setHorizontalOrigin in interface IPicturesetHorizontalOrigin in class ShapeBasevalue - HorizontalOriginpublic VerticalOrigin getVerticalOrigin()
getVerticalOrigin in interface IPicturegetVerticalOrigin in class ShapeBasepublic void setVerticalOrigin(VerticalOrigin value)
setVerticalOrigin in interface IPicturesetVerticalOrigin in class ShapeBasevalue - VerticalOriginpublic float getHorizontalPosition()
getHorizontalPosition in interface IPicturegetHorizontalPosition in class ShapeBasepublic void setHorizontalPosition(float value)
setHorizontalPosition in interface IPicturesetHorizontalPosition in class ShapeBasevalue - the value is measured in points and the position is relative to HorizontalOrigin.public float getVerticalPosition()
getVerticalPosition in interface IPicturegetVerticalPosition in class ShapeBasepublic void setVerticalPosition(float value)
setVerticalPosition in interface IPicturesetVerticalPosition in class ShapeBasevalue - the value is measured in points and the position is relative to VerticalOrigin.public TextWrappingStyle getTextWrappingStyle()
getTextWrappingStyle in interface IPicturegetTextWrappingStyle in class ShapeBasepublic void setTextWrappingStyle(TextWrappingStyle value)
setTextWrappingStyle in interface IPicturesetTextWrappingStyle in class ShapeBasevalue - TextWrappingStylepublic TextWrappingType getTextWrappingType()
getTextWrappingType in interface IPicturegetTextWrappingType in class ShapeBasepublic void setTextWrappingType(TextWrappingType value)
setTextWrappingType in interface IPicturesetTextWrappingType in class ShapeBasevalue - TextWrappingTypepublic ShapeHorizontalAlignment getHorizontalAlignment()
If it is set as None, then the picture is explicitly positioned using position properties. Otherwise it is positioned according to the alignment specified. The position of the object is relative to HorizontalOrigin.
getHorizontalAlignment in interface IPicturegetHorizontalAlignment in class ShapeBasepublic void setHorizontalAlignment(ShapeHorizontalAlignment value)
setHorizontalAlignment in interface IPicturesetHorizontalAlignment in class ShapeBasevalue - if it is set as None, then the picture is explicitly positioned using position properties.
Otherwise it is positioned according to the alignment specified. The position of the object is relative to HorizontalOrigin.public ShapeVerticalAlignment getVerticalAlignment()
getVerticalAlignment in interface IPicturegetVerticalAlignment in class ShapeBasepublic void setVerticalAlignment(ShapeVerticalAlignment value)
setVerticalAlignment in interface IPicturesetVerticalAlignment in class ShapeBasevalue - If it is set as None, then the picture is explicitly positioned using position properties. Otherwise it is positioned according to the alignment specified. The position of the object is relative to VerticalOrigin.public boolean isUnderText()
isUnderText in interface IPicturepublic void isUnderText(boolean value)
isUnderText in interface IPicturevalue - booleanpublic CharacterFormat getCharacterFormat()
getCharacterFormat in class ShapeObjectpublic java.lang.String getAlternativeText()
getAlternativeText in interface IPicturegetAlternativeText in class ShapeBasepublic void setAlternativeText(java.lang.String value)
setAlternativeText in interface IPicturesetAlternativeText in class ShapeBasevalue - the alternative text.public java.lang.String getTitle()
getTitle in interface IPicturepublic void setTitle(java.lang.String value)
setTitle in interface IPicturevalue - the title textpublic boolean getLayoutInCell()
public void setLayoutInCell(boolean value)
value - booleanpublic void loadImage(java.io.InputStream inputStream)
loadImage in interface IPictureinputStream - the image input streampublic void loadImage(java.lang.String filePath)
loadImage in interface IPicturefilePath - the image file pathpublic void loadImage(byte[] imageBytes)
loadImage in interface IPictureimageBytes - byte[]
public void replaceImage(byte[] imageBytes,
boolean bIsKeepRation)
imageBytes - the image bytes.bIsKeepRation - boolean
public IParagraph addCaption(java.lang.String name,
CaptionNumberingFormat format,
CaptionPosition captionPosition)
addCaption in interface IPicturename - nameformat - formatcaptionPosition - captionPosition
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||