|
|||||||||
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.shapes.ShapeBase
com.spire.doc.fields.shapes.Shape
com.spire.doc.fields.ShapeObject
com.spire.doc.fields.DocPicture
public class DocPicture
Constructor Summary | |
---|---|
DocPicture(IDocument doc)
Initializes a new instance of the |
Method Summary | |
---|---|
IParagraph |
addCaption(java.lang.String name,
CaptionNumberingFormat format,
CaptionPosition captionPosition)
Add Caption for current Picture |
boolean |
getBiLevel()
Determines whether an image will be displayed in black and white. |
float |
getBrightness()
Gets or sets picture brightness. |
CharacterFormat |
getCharacterFormat()
Gets shape object's character format. |
PictureColor |
getColor()
Gets or sets picture color. |
float |
getContrast()
Get/set picture contrast. |
DocumentObjectType |
getDocumentObjectType()
|
boolean |
getGrayScale()
Determines whether a picture will display in grayscale mode. |
float |
getHeight()
Returns or sets picture height. |
float |
getHeightScale()
Deprecated. |
ShapeHorizontalAlignment |
getHorizontalAlignment()
Returns or setspicture horizontal alignment. |
HorizontalOrigin |
getHorizontalOrigin()
Gets or sets horizontal origin of the picture. |
float |
getHorizontalPosition()
Gets or sets absolute horizontal position of the picture. |
java.awt.image.BufferedImage |
getImage()
Gets internal System.Drawing.Image object. |
byte[] |
getImageBytes()
Gets image byte array. |
boolean |
getLayoutInCell()
Gets or sets the boolean value that represents whether a picture in a table is displayed inside or outside the table. |
float |
getRotationEx()
Gets/Sets the rotation of DocPicture.Specifies the rotation of the graphic frame. |
TextWrappingStyle |
getTextWrappingStyle()
Gets or sets text wrapping style of the picture. |
TextWrappingType |
getTextWrappingType()
Gets or sets text wrapping type of the picture. |
java.lang.String |
getTitle()
Gets the picture title. |
java.awt.Color |
getTransparentColor()
Gets or sets transparent color |
ShapeVerticalAlignment |
getVerticalAlignment()
Returns or setspicture vertical alignment. |
VerticalOrigin |
getVerticalOrigin()
Gets or sets absolute horizontal position of the picture. |
float |
getVerticalPosition()
Gets or sets absolute vertical position of the picture. |
float |
getWidth()
Returns or sets picture width. |
float |
getWidthScale()
Deprecated. |
boolean |
isCrop()
Gets whether the picture object is cropped. |
boolean |
isUnderText()
Gets or sets whether picture is below image. |
void |
isUnderText(boolean value)
Gets or 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 imgFile)
Loads the image. |
void |
replaceImage(byte[] imageBytes,
boolean bIsKeepRation)
Replaces the image. |
void |
setBiLevel(boolean value)
Determines whether an image will be displayed in black and white. |
void |
setBrightness(float value)
Gets or sets picture brightness. |
void |
setColor(PictureColor value)
Gets or sets picture color. |
void |
setContrast(float value)
Get/set picture contrast. |
void |
setGrayScale(boolean value)
Determines whether a picture will display in grayscale mode. |
void |
setHeight(float value)
Returns or sets picture height. |
void |
setHeightScale(float value)
Deprecated. |
void |
setHorizontalAlignment(ShapeHorizontalAlignment value)
Returns or setspicture horizontal alignment. |
void |
setHorizontalOrigin(HorizontalOrigin value)
Gets or sets horizontal origin of the picture. |
void |
setHorizontalPosition(float value)
Gets or sets absolute horizontal position of the picture. |
void |
setLayoutInCell(boolean value)
Gets or sets the boolean value that represents whether a picture in a table is displayed inside or outside the table. |
void |
setRotationEx(float value)
Gets/Sets the rotation of DocPicture.Specifies the rotation of the graphic frame. |
void |
setScale(float scaleFactor)
Scale the image by scale factor. |
void |
setScale(float heightFactor,
float widthFactor)
Scale the image by scale factor. |
void |
setTextWrappingStyle(TextWrappingStyle value)
Gets or sets text wrapping style of the picture. |
void |
setTextWrappingType(TextWrappingType value)
Gets or sets text wrapping type of the picture. |
void |
setTitle(java.lang.String value)
Gets the picture title. |
void |
setTransparentColor(java.awt.Color value)
Gets or sets transparent color |
void |
setVerticalAlignment(ShapeVerticalAlignment value)
Returns or setspicture vertical alignment. |
void |
setVerticalOrigin(VerticalOrigin value)
Gets or sets absolute horizontal position of the picture. |
void |
setVerticalPosition(float value)
Gets or sets absolute vertical position of the picture. |
void |
setWidth(float value)
Returns or sets picture width. |
void |
setWidthScale(float value)
Deprecated. |
Methods inherited from class com.spire.doc.fields.ShapeObject |
---|
getChart, getChildObjects, getExtrusionEnabled, getFillColor, getLineDashing, getLineStyle, getShadowEnabled, getStrokeColor, getStrokeWeight, getWordArt, setFillColor, setFillTransparency, setLineDashing, setLineStyle, setStrokeColor, setStrokeWeight |
Methods inherited from class com.spire.doc.fields.shapes.Shape |
---|
getFirstParagraph, getLastParagraph, hasChart, hasImage |
Methods inherited from class com.spire.doc.fields.shapes.ShapeBase |
---|
adjustWithEffects, getAllowOverlap, getAlternativeText, getAspectRatioLocked, getBehindText, getBottom, getCoordOrigin, getCoordSize, getDistanceBottom, getDistanceLeft, getDistanceRight, getDistanceTop, getFill, getRight, getRotation, getShapeType, getSize, getWrapType, getZOrder, isHidden, isHidden, isSignatureLine, localToParent, setAllowOverlap, setAlternativeText, setAspectRatioLocked, setBehindText, setCoordOrigin, setCoordSize, setDistanceBottom, setDistanceLeft, setDistanceRight, setDistanceTop, setRotation, setShapeType, setWrapType, setZOrder |
Methods inherited from class com.spire.doc.fields.ParagraphBase |
---|
applyCharacterFormat, applyStyle, getDeleteRevision, getInsertRevision, getNextWidgetSibling, getOwnerParagraph, getPreviousWidgetSibling, getStyleName, isDeleteRevision, isInsertRevision |
Methods inherited from class com.spire.doc.DocumentObject |
---|
deepClone, getFirstChild, getLastChild, getNextSibling, getOwner, getPreviousSibling, isComposite, prependChild, toString |
Methods inherited from class com.spire.doc.OwnerHolder |
---|
getDocument |
Methods inherited from interface com.spire.doc.interfaces.IPicture |
---|
getAlternativeText, setAlternativeText |
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 |
Constructor Detail |
---|
public DocPicture(IDocument doc)
doc
- The doc.Method Detail |
---|
public float getRotationEx()
public void setRotationEx(float value)
public DocumentObjectType getDocumentObjectType()
getDocumentObjectType
in interface IDocumentObject
getDocumentObjectType
in class ShapeObject
public float getHeight()
getHeight
in interface IPicture
getHeight
in class ShapeBase
public void setHeight(float value)
setHeight
in interface IPicture
setHeight
in class ShapeBase
value
- The value is measured in points.public float getWidth()
getWidth
in interface IPicture
getWidth
in class ShapeBase
public void setWidth(float value)
setWidth
in interface IPicture
setWidth
in class ShapeBase
value
- The value is measured in points.@Deprecated public float getHeightScale()
IPicture
getHeightScale
in interface IPicture
@Deprecated public void setHeightScale(float value)
IPicture
setHeightScale
in interface IPicture
value
- float@Deprecated public float getWidthScale()
IPicture
getWidthScale
in interface IPicture
@Deprecated public void setWidthScale(float value)
IPicture
setWidthScale
in interface IPicture
value
- floatpublic void setScale(float scaleFactor)
scaleFactor
- The scale factor. The default unit is percentage.public void setScale(float heightFactor, float widthFactor)
heightFactor
- The height scale factor. The default unit is percentage.widthFactor
- The width scale factor. The default unit is percentage.public java.awt.image.BufferedImage getImage()
getImage
in interface IPicture
public byte[] getImageBytes()
getImageBytes
in interface IPicture
public boolean getGrayScale()
The default value is false.
public void setGrayScale(boolean value)
The default value is false.
public boolean getBiLevel()
The default value is false.
public void setBiLevel(boolean value)
The default value is false.
public float getBrightness()
public void setBrightness(float value)
public float getContrast()
public void setContrast(float value)
public PictureColor getColor()
public void setColor(PictureColor value)
public java.awt.Color getTransparentColor()
public void setTransparentColor(java.awt.Color value)
public boolean isCrop()
public HorizontalOrigin getHorizontalOrigin()
getHorizontalOrigin
in interface IPicture
getHorizontalOrigin
in class ShapeBase
public void setHorizontalOrigin(HorizontalOrigin value)
setHorizontalOrigin
in interface IPicture
setHorizontalOrigin
in class ShapeBase
value
- HorizontalOriginpublic VerticalOrigin getVerticalOrigin()
getVerticalOrigin
in interface IPicture
getVerticalOrigin
in class ShapeBase
public void setVerticalOrigin(VerticalOrigin value)
setVerticalOrigin
in interface IPicture
setVerticalOrigin
in class ShapeBase
value
- VerticalOriginpublic float getHorizontalPosition()
The value is measured in points and the position is relative to HorizontalOrigin.
getHorizontalPosition
in interface IPicture
getHorizontalPosition
in class ShapeBase
public void setHorizontalPosition(float value)
The value is measured in points and the position is relative to HorizontalOrigin.
setHorizontalPosition
in interface IPicture
setHorizontalPosition
in class ShapeBase
value
- the value is measured in points and the position is relative to HorizontalOrigin.public float getVerticalPosition()
The value is measured in points and the position is relative to VerticalOrigin.
getVerticalPosition
in interface IPicture
getVerticalPosition
in class ShapeBase
public void setVerticalPosition(float value)
The value is measured in points and the position is relative to VerticalOrigin.
setVerticalPosition
in interface IPicture
setVerticalPosition
in class ShapeBase
value
- the value is measured in points and the position is relative to VerticalOrigin.public TextWrappingStyle getTextWrappingStyle()
getTextWrappingStyle
in interface IPicture
getTextWrappingStyle
in class ShapeBase
public void setTextWrappingStyle(TextWrappingStyle value)
setTextWrappingStyle
in interface IPicture
setTextWrappingStyle
in class ShapeBase
value
- TextWrappingStylepublic TextWrappingType getTextWrappingType()
getTextWrappingType
in interface IPicture
getTextWrappingType
in class ShapeBase
public void setTextWrappingType(TextWrappingType value)
setTextWrappingType
in interface IPicture
setTextWrappingType
in class ShapeBase
value
- 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 IPicture
getHorizontalAlignment
in class ShapeBase
public void setHorizontalAlignment(ShapeHorizontalAlignment value)
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.
setHorizontalAlignment
in interface IPicture
setHorizontalAlignment
in class ShapeBase
value
- ShapeHorizontalAlignmentpublic ShapeVerticalAlignment getVerticalAlignment()
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.
getVerticalAlignment
in interface IPicture
getVerticalAlignment
in class ShapeBase
public void setVerticalAlignment(ShapeVerticalAlignment value)
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.
setVerticalAlignment
in interface IPicture
setVerticalAlignment
in class ShapeBase
value
- ShapeVerticalAlignmentpublic boolean isUnderText()
isUnderText
in interface IPicture
public void isUnderText(boolean value)
isUnderText
in interface IPicture
public CharacterFormat getCharacterFormat()
getCharacterFormat
in class ShapeObject
public java.lang.String getTitle()
getTitle
in interface IPicture
getTitle
in class ShapeBase
public void setTitle(java.lang.String value)
setTitle
in interface IPicture
setTitle
in class ShapeBase
value
- the title textpublic boolean getLayoutInCell()
public void setLayoutInCell(boolean value)
public void loadImage(java.lang.String imgFile)
loadImage
in interface IPicture
imgFile
- The img file.public void loadImage(java.io.InputStream inputStream)
loadImage
in interface IPicture
inputStream
- the image input streampublic void loadImage(byte[] imageBytes)
loadImage
in interface IPicture
imageBytes
- public void replaceImage(byte[] imageBytes, boolean bIsKeepRation)
imageBytes
- The image bytes.bIsKeepRation
- public IParagraph addCaption(java.lang.String name, CaptionNumberingFormat format, CaptionPosition captionPosition)
addCaption
in interface IPicture
captionPosition
- name
- format
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |