|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPictureElement
Provides access to members that control the Picture element.
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.
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 |
---|
String getPictureDescription() throws IOException, AutomationException
PictureDescription will return a description of the picture within the PictureElement. For instance, a bitmap picture might return the description "Windows Bitmap".
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getFilter() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getPictureAspectRatio() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isMaintainAspectRatio() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMaintainAspectRatio(boolean bRatio) throws IOException, AutomationException
bRatio
- The bRatio (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isSavePictureInDocument() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSavePictureInDocument(boolean bSaveInDoc) throws IOException, AutomationException
bSaveInDoc
- The bSaveInDoc (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void importPictureFromFile(String name) throws IOException, AutomationException
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).
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |