docpicture-ag凯发旗舰厅



com.spire.doc.fields
class docpicture

java.lang.object
  extended by com.spire.doc.ownerholder
      extended by com.spire.doc.documents.xml.documentserializable
          extended by com.spire.doc.documentobject
              extended by com.spire.doc.documentbase
                  extended by com.spire.doc.fields.paragraphbase
                      extended by com.spire.doc.fields.shape.shapebase
                          extended by com.spire.doc.fields.shapeobject
                              extended by com.spire.doc.fields.docpicture
all implemented interfaces:
irunattrsource, icompositeobject, idocumentobject, iparagraphbase, ipicture

public class docpicture
extends shapeobject
implements ipicture

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

docpicture

public docpicture(idocument doc)
initializes a new instance of the docpicture class.
parameters:
doc - the doc.
method detail

getrotationex

public float getrotationex()
gets the rotation of docpicture.specifies the rotation of the graphic frame.
returns:
float

setrotationex

public void setrotationex(float value)
sets the rotation of docpicture.specifies the rotation of the graphic frame.
parameters:
value - float

getdocumentobjecttype

public documentobjecttype getdocumentobjecttype()
gets the type of the document object.
specified by:
getdocumentobjecttype in interface idocumentobject
overrides:
getdocumentobjecttype in class shapeobject
returns:
the type of the document object.

getheight

public float getheight()
returns picture height.
specified by:
getheight in interface ipicture
overrides:
getheight in class shapebase
returns:
float

setheight

public void setheight(float value)
sets picture height.
specified by:
setheight in interface ipicture
overrides:
setheight in class shapebase
parameters:
value - the value is measured in points.

getwidth

public float getwidth()
returns picture width.
specified by:
getwidth in interface ipicture
overrides:
getwidth in class shapebase
returns:
float

setwidth

public void setwidth(float value)
sets picture width.
specified by:
setwidth in interface ipicture
overrides:
setwidth in class shapebase
parameters:
value - the value is measured in points.

getheightscale

public float getheightscale()
returns picture height scale factor in percent.
specified by:
getheightscale in interface ipicture
returns:
float

setheightscale

public void setheightscale(float value)
sets picture height scale factor in percent.
specified by:
setheightscale in interface ipicture
parameters:
value - float

getwidthscale

public float getwidthscale()
returns picture width scale factor in percent.
specified by:
getwidthscale in interface ipicture
returns:
float

setwidthscale

public void setwidthscale(float value)
sets picture width scale factor in percent.
specified by:
setwidthscale in interface ipicture
parameters:
value - float

getimage

public java.awt.image.bufferedimage getimage()
gets internal image object.
specified by:
getimage in interface ipicture
returns:
bufferedimage

getimagebytes

public byte[] getimagebytes()
gets image byte array.
specified by:
getimagebytes in interface ipicture
returns:
byte[]

getgrayscale

public boolean getgrayscale()
gets whether a picture will display in grayscale mode.
returns:
the default value is false.

setgrayscale

public void setgrayscale(boolean value)
sets whether a picture will display in grayscale mode.
parameters:
value - boolean

getbilevel

public boolean getbilevel()
gets whether an image will be displayed in black and white.
returns:
the default value is false.

setbilevel

public void setbilevel(boolean value)
sets whether an image will be displayed in black and white.
parameters:
value - boolean

getbrightness

public float getbrightness()
gets picture brightness.
returns:
float

setbrightness

public void setbrightness(float value)
sets picture brightness.
parameters:
value - float

getcontrast

public float getcontrast()
get picture contrast.
returns:
float

setcontrast

public void setcontrast(float value)
set picture contrast.
parameters:
value - float

getcolor

public picturecolor getcolor()
get picture color.
returns:
picturecolor

setcolor

public void setcolor(picturecolor value)
set picture color.
parameters:
value - picturecolor

gettransparentcolor

public java.awt.color gettransparentcolor()
gets transparent color
returns:
color

settransparentcolor

public void settransparentcolor(java.awt.color value)
sets transparent color
parameters:
value - color

iscrop

public boolean iscrop()
gets whether the picture object is cropped.
returns:
boolean

gethorizontalorigin

public horizontalorigin gethorizontalorigin()
gets horizontal origin of the picture.
specified by:
gethorizontalorigin in interface ipicture
overrides:
gethorizontalorigin in class shapebase
returns:
horizontalorigin

sethorizontalorigin

public void sethorizontalorigin(horizontalorigin value)
sets horizontal origin of the picture.
specified by:
sethorizontalorigin in interface ipicture
overrides:
sethorizontalorigin in class shapebase
parameters:
value - horizontalorigin

getverticalorigin

public verticalorigin getverticalorigin()
gets absolute horizontal position of the picture.
specified by:
getverticalorigin in interface ipicture
overrides:
getverticalorigin in class shapebase
returns:
verticalorigin

setverticalorigin

public void setverticalorigin(verticalorigin value)
sets absolute horizontal position of the picture.
specified by:
setverticalorigin in interface ipicture
overrides:
setverticalorigin in class shapebase
parameters:
value - verticalorigin

gethorizontalposition

public float gethorizontalposition()
gets absolute horizontal position of the picture.
specified by:
gethorizontalposition in interface ipicture
overrides:
gethorizontalposition in class shapebase
returns:
float

sethorizontalposition

public void sethorizontalposition(float value)
sets absolute horizontal position of the picture.
specified by:
sethorizontalposition in interface ipicture
overrides:
sethorizontalposition in class shapebase
parameters:
value - the value is measured in points and the position is relative to horizontalorigin.

getverticalposition

public float getverticalposition()
gets absolute vertical position of the picture.
specified by:
getverticalposition in interface ipicture
overrides:
getverticalposition in class shapebase
returns:
float

setverticalposition

public void setverticalposition(float value)
sets absolute vertical position of the picture.
specified by:
setverticalposition in interface ipicture
overrides:
setverticalposition in class shapebase
parameters:
value - the value is measured in points and the position is relative to verticalorigin.

gettextwrappingstyle

public textwrappingstyle gettextwrappingstyle()
gets text wrapping style of the picture.
specified by:
gettextwrappingstyle in interface ipicture
overrides:
gettextwrappingstyle in class shapebase
returns:
textwrappingstyle

settextwrappingstyle

public void settextwrappingstyle(textwrappingstyle value)
sets text wrapping style of the picture.
specified by:
settextwrappingstyle in interface ipicture
overrides:
settextwrappingstyle in class shapebase
parameters:
value - textwrappingstyle

gettextwrappingtype

public textwrappingtype gettextwrappingtype()
gets text wrapping type of the picture.
specified by:
gettextwrappingtype in interface ipicture
overrides:
gettextwrappingtype in class shapebase
returns:
textwrappingtype

settextwrappingtype

public void settextwrappingtype(textwrappingtype value)
sets text wrapping type of the picture.
specified by:
settextwrappingtype in interface ipicture
overrides:
settextwrappingtype in class shapebase
parameters:
value - textwrappingtype

gethorizontalalignment

public shapehorizontalalignment gethorizontalalignment()
returns picture horizontal alignment.

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.

specified by:
gethorizontalalignment in interface ipicture
overrides:
gethorizontalalignment in class shapebase
returns:
shapehorizontalalignment

sethorizontalalignment

public void sethorizontalalignment(shapehorizontalalignment value)
sets picture horizontal alignment.
specified by:
sethorizontalalignment in interface ipicture
overrides:
sethorizontalalignment in class shapebase
parameters:
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.

getverticalalignment

public shapeverticalalignment getverticalalignment()
returns picture vertical alignment.
specified by:
getverticalalignment in interface ipicture
overrides:
getverticalalignment in class shapebase
returns:
shapeverticalalignment

setverticalalignment

public void setverticalalignment(shapeverticalalignment value)
sets picture vertical alignment.
specified by:
setverticalalignment in interface ipicture
overrides:
setverticalalignment in class shapebase
parameters:
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.

isundertext

public boolean isundertext()
gets whether picture is below image.
specified by:
isundertext in interface ipicture
returns:
boolean

isundertext

public void isundertext(boolean value)
sets whether picture is below image.
specified by:
isundertext in interface ipicture
parameters:
value - boolean

getcharacterformat

public characterformat getcharacterformat()
gets shape object's character format.
overrides:
getcharacterformat in class shapeobject
returns:
characterformat

getalternativetext

public java.lang.string getalternativetext()
gets the alternative text.
specified by:
getalternativetext in interface ipicture
overrides:
getalternativetext in class shapebase
returns:
the alternative text.

setalternativetext

public void setalternativetext(java.lang.string value)
sets the alternative text.
specified by:
setalternativetext in interface ipicture
overrides:
setalternativetext in class shapebase
parameters:
value - the alternative text.

gettitle

public java.lang.string gettitle()
gets the picture title.
specified by:
gettitle in interface ipicture
returns:
the title.

settitle

public void settitle(java.lang.string value)
sets the picture title.
specified by:
settitle in interface ipicture
parameters:
value - the title text

getlayoutincell

public boolean getlayoutincell()
gets the boolean value that represents whether a picture in a table is displayed inside or outside the table.
returns:
boolean

setlayoutincell

public void setlayoutincell(boolean value)
sets the boolean value that represents whether a picture in a table is displayed inside or outside the table.
parameters:
value - boolean

loadimage

public void loadimage(java.io.inputstream inputstream)
loads image.
specified by:
loadimage in interface ipicture
parameters:
inputstream - the image input stream

loadimage

public void loadimage(java.lang.string filepath)
loads image.
specified by:
loadimage in interface ipicture
parameters:
filepath - the image file path

loadimage

public void loadimage(byte[] imagebytes)
loads image as bytes array.
specified by:
loadimage in interface ipicture
parameters:
imagebytes - byte[]

replaceimage

public void replaceimage(byte[] imagebytes,
                         boolean biskeepration)
replaces the image.
parameters:
imagebytes - the image bytes.
biskeepration - boolean

addcaption

public iparagraph addcaption(java.lang.string name,
                             captionnumberingformat format,
                             captionposition captionposition)
add caption for current picture.
specified by:
addcaption in interface ipicture
parameters:
name - name
format - format
captionposition - captionposition
returns:
iparagraph


网站地图