com.aspose.slides
Class PictureFrame

java.lang.Object
  extended by com.aspose.slides.Shape
      extended by com.aspose.slides.PictureFrame
All Implemented Interfaces:
IPictureFrame, IShape, IShapeFormat
Direct Known Subclasses:
AudioFrame, OleObjectFrame, VideoFrame

public class PictureFrame
extends Shape
implements IPictureFrame

Represents the PictureFrame shape.


Method Summary
 TextFrame addTextFrame(java.lang.String text)
          Add a new TextFrame to a shape.
 int getBrightness()
          Returns the brightness (0-100%) of a picture.
 int getColorType()
          Returns the type of a color transformation applied to a picture.
 int getContrast()
          Returns the contrast (0-100%) of a picture.
 float getCropBottom()
          Returns the number of percents of a real image height that are cropped off from the bottom of a picture.
 float getCropLeft()
          Returns the number of percents of a real image width that are cropped off from the left of a picture.
 float getCropRight()
          Returns the number of percents of a real image width that are cropped off from the right of a picture.
 float getCropTop()
          Returns the number of percents of a real image height that are cropped off from the top of a picture.
 java.lang.String getPictureFileName()
          Returns the file name of a linked picture.
 int getPictureId()
          Returns the picture Id of a PictureFrame.
 RecolorTable getRecolor()
          Returns the table of colors replacements for metafiles recoloring.
 java.awt.Color getTransparentColor()
          Returns the transparent color of a picture.
 boolean isPictureLinked()
          Determines whether the picture is linked to an external file.
static java.awt.image.BufferedImage makeColorTransparent(java.awt.image.BufferedImage simg, java.awt.Color color)
           
 void serialize(java.io.OutputStream stream)
          Serializes a PictureFrame object to the stream.
 void setBrightness(int value)
          Sets the brightness (0-100%) of a picture.
 void setColorType(int value)
          Sets the type of a color transformation applied to a picture.
 void setContrast(int value)
          Sets the contrast (0-100%) of a picture.
 void setCropBottom(float value)
          Sets the number of percents of a real image height that are cropped off from the bottom of a picture.
 void setCropLeft(float value)
          Sets the number of percents of a real image width that are cropped off from the left of a picture.
 void setCropRight(float value)
          Sets the number of percents of a real image width that are cropped off from the right of a picture.
 void setCropTop(float value)
          Sets the number of percents of a real image height that are cropped off from the top of a picture.
 void setPictureFileName(java.lang.String value)
          Sets the file name of a linked picture.
 void setPictureId(int value)
          Sets the picture Id of a PictureFrame.
 void setTransparentColor(java.awt.Color value)
          Sets the transparent color of a picture.
 
Methods inherited from class com.aspose.slides.Shape
addLink, clearLink, createShapeElements, createShapeElements, getAlternativeText, getAnimationSettings, getConnectionSites, getConnectionSitesRaw, getFillFormat, getHeight, getLineFormat, getLink, getMasterShapeId, getName, getParent, getPlaceholder, getProtection, getRotation, getShadowFormat, getShapeId, getShapeRectangle, getTags, getTextFrame, getThreeDFormat, getWidth, getX, getY, getZOrderPosition, hasExternalData, isFlipH, isFlipV, isHidden, isMasterTextHolder, isTextHolder, setAlternativeText, setFlipH, setFlipV, setHeight, setHidden, setName, setProtection, setRotation, setWidth, setX, setY, zOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

serialize

public void serialize(java.io.OutputStream stream)
               throws PptException
Serializes a PictureFrame object to the stream.

Overrides:
serialize in class Shape
Parameters:
stream - The stream to which the PictureFrame is to be serialized.
Throws:
PptException

makeColorTransparent

public static java.awt.image.BufferedImage makeColorTransparent(java.awt.image.BufferedImage simg,
                                                                java.awt.Color color)

getCropTop

public float getCropTop()
Returns the number of percents of a real image height that are cropped off from the top of a picture.

Specified by:
getCropTop in interface IPictureFrame

setCropTop

public void setCropTop(float value)
Sets the number of percents of a real image height that are cropped off from the top of a picture.

Specified by:
setCropTop in interface IPictureFrame
Parameters:
value - the percents of an image height cropped from the top.

getCropBottom

public float getCropBottom()
Returns the number of percents of a real image height that are cropped off from the bottom of a picture.

Specified by:
getCropBottom in interface IPictureFrame

setCropBottom

public void setCropBottom(float value)
Sets the number of percents of a real image height that are cropped off from the bottom of a picture.

Specified by:
setCropBottom in interface IPictureFrame
Parameters:
value - the percents of an image height cropped from the bottom.

getCropLeft

public float getCropLeft()
Returns the number of percents of a real image width that are cropped off from the left of a picture.

Specified by:
getCropLeft in interface IPictureFrame

setCropLeft

public void setCropLeft(float value)
Sets the number of percents of a real image width that are cropped off from the left of a picture.

Specified by:
setCropLeft in interface IPictureFrame
Parameters:
value - the percents of an image width cropped from the left.

getCropRight

public float getCropRight()
Returns the number of percents of a real image width that are cropped off from the right of a picture.

Specified by:
getCropRight in interface IPictureFrame

setCropRight

public void setCropRight(float value)
Sets the number of percents of a real image width that are cropped off from the right of a picture.

Specified by:
setCropRight in interface IPictureFrame
Parameters:
value - the percents of an image width cropped from the right.

getTransparentColor

public java.awt.Color getTransparentColor()
Returns the transparent color of a picture.

Specified by:
getTransparentColor in interface IPictureFrame

setTransparentColor

public void setTransparentColor(java.awt.Color value)
Sets the transparent color of a picture.

Specified by:
setTransparentColor in interface IPictureFrame
Parameters:
value - new transparent color of a picture.

getBrightness

public int getBrightness()
Returns the brightness (0-100%) of a picture.

Specified by:
getBrightness in interface IPictureFrame

setBrightness

public void setBrightness(int value)
                   throws PptPropertyException
Sets the brightness (0-100%) of a picture.

Specified by:
setBrightness in interface IPictureFrame
Parameters:
value - new brightness value.
Throws:
PptPropertyException

getContrast

public int getContrast()
Returns the contrast (0-100%) of a picture.

Specified by:
getContrast in interface IPictureFrame

setContrast

public void setContrast(int value)
                 throws PptPropertyException
Sets the contrast (0-100%) of a picture.

Specified by:
setContrast in interface IPictureFrame
Parameters:
value - new contrast value.
Throws:
PptPropertyException

getColorType

public int getColorType()
Returns the type of a color transformation applied to a picture. See PictureColorType.

Specified by:
getColorType in interface IPictureFrame

setColorType

public void setColorType(int value)
Sets the type of a color transformation applied to a picture.

Specified by:
setColorType in interface IPictureFrame
Parameters:
value - new type of color transformation. See PictureColorType .

getRecolor

public RecolorTable getRecolor()
Returns the table of colors replacements for metafiles recoloring.

Specified by:
getRecolor in interface IPictureFrame

getPictureId

public int getPictureId()
Returns the picture Id of a PictureFrame.

Specified by:
getPictureId in interface IPictureFrame

setPictureId

public void setPictureId(int value)
Sets the picture Id of a PictureFrame.

Specified by:
setPictureId in interface IPictureFrame
Parameters:
value - new picture Id.

isPictureLinked

public boolean isPictureLinked()
Determines whether the picture is linked to an external file.

Specified by:
isPictureLinked in interface IPictureFrame
Returns:
true if picture is linked to an external file.

getPictureFileName

public java.lang.String getPictureFileName()
Returns the file name of a linked picture.

Specified by:
getPictureFileName in interface IPictureFrame
Returns:
the file name of a linked picture.

setPictureFileName

public void setPictureFileName(java.lang.String value)
Sets the file name of a linked picture.

Specified by:
setPictureFileName in interface IPictureFrame
Parameters:
value - new file name.

addTextFrame

public TextFrame addTextFrame(java.lang.String text)
                       throws PptEditException
Add a new TextFrame to a shape. If shape already has TextFrame then do nothing.

Overrides:
addTextFrame in class Shape
Parameters:
text - default text of a new TextFrame.
Returns:
Created TextFrame object.
Throws:
PptEditException