|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IImageService
This interface provides services for the creation of images.
Method Summary | |
---|---|
byte[] |
convertDiagramToBytes(Diagram diagram,
int format)
Converts the given diagram into an image byte array in the given format. This allows end users to export diagrams without having to run the associated GEF editor. |
byte[] |
convertImageToBytes(Image image,
int format)
Converts the given Image into a byte array in the given format
that could be directly saved to a file in that format. |
ImageDescriptor |
getImageDescriptorForId(String diagramTypeProviderId,
String imageId)
Gets an image descriptor for the given image id. |
Image |
getImageForId(String diagramTypeProviderId,
String imageId)
Gets an image for the given image id. |
ImageDescriptor |
getPlatformImageDescriptorForId(String imageId)
Gets an image descriptor for the given image id. |
Image |
getPlatformImageForId(String imageId)
Gets an image for the given image id. |
void |
removeImageFromRegistry(String imageId)
Removes the corresponding image entry from the image registry and disposes the corresponding image (if existent). |
Method Detail |
---|
ImageDescriptor getImageDescriptorForId(String diagramTypeProviderId, String imageId)
org.eclipse.graphiti.ui
is used. This ensures that the image
descriptor will only created once.
imageId
- the image id which is supported by an graphiti image providerdiagramTypeProviderId
-
org.eclipse.jface.resource.ImageDescriptor
Image getImageForId(String diagramTypeProviderId, String imageId)
org.eclipse.graphiti.ui
is used. This ensures that the image
will only created once. The image returned must not be disposed by the
caller.
imageId
- the image id which is supported by an graphiti image provider
org.eclipse.swt.graphics.Image
void removeImageFromRegistry(String imageId)
org.eclipse.graphiti.ui
is used. Only call this
method if you can guarantee that the image/image descriptor is no longer
in use.
imageId
- the image id which is supported by an graphiti image providerorg.eclipse.swt.graphics.Image
ImageDescriptor getPlatformImageDescriptorForId(String imageId)
org.eclipse.graphiti.ui
is used. This ensures
that the image descriptor will only created once.
imageId
- the image id which is supported by the graphiti platform image
provider
org.eclipse.jface.resource.ImageDescriptor
Image getPlatformImageForId(String imageId)
org.eclipse.graphiti.ui
is used. This ensures that the image
will only created once. The image returned must not be disposed by the
caller.
imageId
- the image id which is supported by the graphiti platform image
provider
org.eclipse.swt.graphics.Image
byte[] convertImageToBytes(Image image, int format)
Image
into a byte array in the given format
that could be directly saved to a file in that format. Supported formats
are BMP (Windows or OS/2 Bitmap), ICO (Windows Icon), JPEG, GIF, PNG and
TIFF, see ImageLoader
for details.IllegalStateException
.
image
- The image to convert to a byte arrayformat
- The format to use see ImageLoader
In
- case of GIF format and the image having more than 256 colors.byte[] convertDiagramToBytes(Diagram diagram, int format)
diagram
- The diagram to convert to a byte arrayformat
- The format to use see ImageLoader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |