com.esri.arcgis.carto
Interface IPictureElement

All Superinterfaces:
Serializable
All Known Implementing Classes:
BmpPictureElement, EmfPictureElement, GifPictureElement, ImgPictureElement, Jp2PictureElement, JpgPictureElement, PictureElement, PngPictureElement, SidPictureElement, TifPictureElement

public interface IPictureElement
extends Serializable

Provides access to members that control the Picture element.

Superseded By

IPictureElement3

When To Use

IPictureElement is the generic interface implemented by all picture elements (BmpPictureElement and EmfPictureElement). Use this interface when you want to manipulate the properties associated with the picture element.

PictureElements are similar to OleFrame objects, but not quite the same. The initial difference is that PictureElements are the elements themselves, while OleFrames are the frames around the object. On a more subtle level, OleFrame objects can contain pictures (bmp files, etc.), but they can also contain other types of OLE objects (word documents, excel spreadsheets, etc.). PictureElements can only contain pictures (bmp or emf files).

PictureElements can be added to a data frame, but they are normally used within a page layout.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 String getFilter()
          Filter used in CFileDialog.
 double getPictureAspectRatio()
          Filter used in CFileDialog.
 String getPictureDescription()
          Description of the Picture Element.
 void importPictureFromFile(String name)
          File to be imported.
 boolean isMaintainAspectRatio()
          Indicates if the resize box will maintain the picture's aspect ratio.
 boolean isSavePictureInDocument()
          Indicates if the Picture will be stored in the Document.
 void setMaintainAspectRatio(boolean bRatio)
          Indicates if the resize box will maintain the picture's aspect ratio.
 void setSavePictureInDocument(boolean bSaveInDoc)
          Indicates if the Picture will be stored in the Document.
 

Method Detail

getPictureDescription

String getPictureDescription()
                             throws IOException,
                                    AutomationException
Description of the Picture Element.

Remarks

PictureDescription will return a description of the picture within the PictureElement. For instance, a bitmap picture might return the description "Windows Bitmap".

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The description
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFilter

String getFilter()
                 throws IOException,
                        AutomationException
Filter used in CFileDialog.

Remarks

Filter returns the filter used when executing the ImportPictureFromFile method. For instance, if we have an EmfPictureElement, then the filter is "Windows Enhance Metafile (*.emf)|*.emf|". Only files that match the filter can be imported into the object.

The Filter property can be used to determine if the PictureElement is a BmpPictureElement or an EmfPictureElement.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The filter
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPictureAspectRatio

double getPictureAspectRatio()
                             throws IOException,
                                    AutomationException
Filter used in CFileDialog.

Remarks

PictureAspectRatio returns the ratio of the x and y parameters of the picture. The ratio is calculated by dividing the x length of the picture by the y length.

The PictureAspectRatio can only be manipulated through the user interface and only when the MaintainAspectRatio property is set to False.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The ratio
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isMaintainAspectRatio

boolean isMaintainAspectRatio()
                              throws IOException,
                                     AutomationException
Indicates if the resize box will maintain the picture's aspect ratio.

Remarks

MaintainAspectRatio specifies whether the ratio between the x and y lengths (width and height) of the picture need to be maintained when resizing. If the MaintainAspectRatio property is set to False, the width and height of the picture can be adjusted independently. If the property is True, then the width and height can only be manipulated together to maintain the same ratio.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The bRatio
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMaintainAspectRatio

void setMaintainAspectRatio(boolean bRatio)
                            throws IOException,
                                   AutomationException
Indicates if the resize box will maintain the picture's aspect ratio.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
bRatio - The bRatio (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSavePictureInDocument

boolean isSavePictureInDocument()
                                throws IOException,
                                       AutomationException
Indicates if the Picture will be stored in the Document.

Remarks

SavePictureInDocument specifies whether the actual picture is saved in the document, or a link to the file on disk. If you want to be sure a picture in your document does not change, then you would set the SavePictureInDocument option to True.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The bSaveInDoc
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSavePictureInDocument

void setSavePictureInDocument(boolean bSaveInDoc)
                              throws IOException,
                                     AutomationException
Indicates if the Picture will be stored in the Document.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
bSaveInDoc - The bSaveInDoc (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

importPictureFromFile

void importPictureFromFile(String name)
                           throws IOException,
                                  AutomationException
File to be imported.

Remarks

ImportPictureFromFile allows for updating the PictureElement based on a file of the proper format. The Filter property is used to screen the files being loaded through ImportPictureFromFile to make sure they are of the correct type. The Filter property is based on the picture element object being manipulated (either a BmpPictureElement or an EmfPictureElement).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.