Class ImageExportResult
java.lang.Object
com.nomagic.magicdraw.export.image.ImageExportResult
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Rectangle
Start point in the diagram and dimension exported diagram areaprotected Rectangle
Start point in the diagram canvas and dimension exported diagram canvas area.protected ImageExportResult.ImageExportStatus
protected Rectangle
Rectangle of exported image.protected Rectangle
Rectangle within exported image containing exported are -
Constructor Summary
ConstructorsConstructorDescriptionImageExportResult
(com.dassault_systemes.modeler.magic.diagram.image.InternalImageExportResult result) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
void
setExportedAreaRect
(Rectangle exportedAreaRect) void
setExportedCanvasAreaRect
(Rectangle exportedCanvasAreaRect) void
setExportStatus
(ImageExportResult.ImageExportStatus exportStatus) void
setImageRect
(Rectangle imageRect) void
setImageWithoutBannersRect
(Rectangle imageWithoutBannersRect) final void
setValuesFromInternalResult
(com.dassault_systemes.modeler.magic.diagram.image.InternalImageExportResult result)
-
Field Details
-
exportStatus
-
exportedAreaRect
Start point in the diagram and dimension exported diagram area -
exportedCanvasAreaRect
Start point in the diagram canvas and dimension exported diagram canvas area. This is useful for finding location of shapes in exported image when working withSymbolDiagramElementsLocator.getLocatedElements()
as returned shape coordinates are already offset by canvas coordinated -
imageWithoutBannersRect
Rectangle within exported image containing exported are -
imageRect
Rectangle of exported image.
-
-
Constructor Details
-
ImageExportResult
public ImageExportResult() -
ImageExportResult
public ImageExportResult(com.dassault_systemes.modeler.magic.diagram.image.InternalImageExportResult result)
-
-
Method Details
-
setValuesFromInternalResult
public final void setValuesFromInternalResult(com.dassault_systemes.modeler.magic.diagram.image.InternalImageExportResult result) -
isExportSuccessful
public boolean isExportSuccessful() -
isDiagramNotExported
public boolean isDiagramNotExported()- Returns:
- true if diagram was not exported due to exceeding limits or some error
-
getExportStatus
-
setExportStatus
-
getExportedAreaRect
-
setExportedAreaRect
-
getExportedCanvasAreaRect
-
setExportedCanvasAreaRect
-
getImageWithoutBannersRect
-
setImageWithoutBannersRect
-
getImageRect
-
setImageRect
-