Class ImageExportResult
- java.lang.Object
-
- com.nomagic.magicdraw.export.image.ImageExportResult
-
@OpenApiAll public class ImageExportResult extends java.lang.Object
Class providing image export result.Diagram: Diagram canvas: +-------------------------+ | HEADER | +-------------------------+ +--------------------------+ | | | +----------------------| <-- canvas bound for exporting when shapes are not close to border | +-------------+ | | | | | | | | | | +-------------+ | | | A | | | | | AA | | | | | | | | | | | | +-------------+ | | | +-------------+ | | | | | | +-------------------------+ +--------------------------+ | FOOTER | +-------------------------+ Exported image with banners: +-- | +-------------+ | | HEADER | | +-------------+ | | | B | | C | | | | | +-------------+ | | FOOTER | | +-------------+ +-- Exported image without banners: +-- | +-------------+ | | | B | | C | | | | | +-------------+ +-- Failed export image: +- | +----------------+ B | | Error message | | +----------------+ +- A -
exportedAreaRect
Start point and dimension of exported diagram area. In case of failed export (over time/dimension limits, error) rectangle will be empty as no part of diagram was exported AA -exportedCanvasAreaRect
Start point and dimension of exported diagram canvas area. Shape bounds returned fromSymbolDiagramElementsLocator.getLocatedElements()
are offset from 0,0 point if no shape is close enough to border, this makes it harder to locate them on image without this value. In case of failed export (over time/dimension limits, error) rectangle will be empty as no part of diagram was exported B -imageRect
Rectangle of exported image. ContainsimageWithoutBannersRect
and banners, or is same asimageWithoutBannersRect
if banners are not exported Might also be just size of failed export image C -imageWithoutBannersRect
Rectangle within exported image containingexportedAreaRect
(same height and width, only starting coordinates are different) In case of failed export (over time/dimension limits, error) rectangle will be empty as it does not exist in exported image A and C only differs in starting coordinate since one is in diagram coordinates, other in exported image
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageExportResult.ImageExportStatus
-
Constructor Summary
Constructors Constructor Description ImageExportResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Rectangle
getExportedAreaRect()
java.awt.Rectangle
getExportedCanvasAreaRect()
ImageExportResult.ImageExportStatus
getExportStatus()
java.awt.Rectangle
getImageRect()
java.awt.Rectangle
getImageWithoutBannersRect()
boolean
isDiagramNotExported()
boolean
isExportSuccessful()
void
setExportedAreaRect(java.awt.Rectangle exportedAreaRect)
void
setExportedCanvasAreaRect(java.awt.Rectangle exportedCanvasAreaRect)
void
setExportStatus(ImageExportResult.ImageExportStatus exportStatus)
void
setImageRect(java.awt.Rectangle imageRect)
void
setImageWithoutBannersRect(java.awt.Rectangle imageWithoutBannersRect)
-
-
-
Method Detail
-
isExportSuccessful
public boolean isExportSuccessful()
-
isDiagramNotExported
public boolean isDiagramNotExported()
- Returns:
- true if diagram was not exported due to exceeding limits or some error
-
getExportStatus
public ImageExportResult.ImageExportStatus getExportStatus()
-
setExportStatus
public void setExportStatus(ImageExportResult.ImageExportStatus exportStatus)
-
getExportedAreaRect
public java.awt.Rectangle getExportedAreaRect()
-
setExportedAreaRect
public void setExportedAreaRect(java.awt.Rectangle exportedAreaRect)
-
getExportedCanvasAreaRect
public java.awt.Rectangle getExportedCanvasAreaRect()
-
setExportedCanvasAreaRect
public void setExportedCanvasAreaRect(java.awt.Rectangle exportedCanvasAreaRect)
-
getImageWithoutBannersRect
public java.awt.Rectangle getImageWithoutBannersRect()
-
setImageWithoutBannersRect
public void setImageWithoutBannersRect(java.awt.Rectangle imageWithoutBannersRect)
-
getImageRect
public java.awt.Rectangle getImageRect()
-
setImageRect
public void setImageRect(java.awt.Rectangle imageRect)
-
-