Packagecom.yworks.remote
Classpublic class ImageSaveHandler
InheritanceImageSaveHandler Inheritance AbstractImageExportHandler Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined By
 InheritedmaxImageSize : ISize
Get or set the maximum allowed image size.
AbstractImageExportHandler
Protected Properties
 PropertyDefined By
 InheritedfileReference : FileReference
The FileReference which handles the file operations.
AbstractImageExportHandler
Public Methods
 MethodDefined By
 Inherited
export(canvas:CanvasComponent, defaultFileName:String, exportOptions:ExportOptions = null, canvasSprite:Sprite = null):void
Exports the image using the provided export options.
AbstractImageExportHandler
Protected Methods
 MethodDefined By
 Inherited
createFileReference():FileReference
Creates a new FileReference and sets the fileReference property.
AbstractImageExportHandler
 Inherited
createImageAsByteArray(canvas:CanvasComponent, exportOptions:ExportOptions, canvasSprite:Sprite = null):ByteArray
Create a ByteArray which contains an encoded image of the canvas.
AbstractImageExportHandler
 Inherited
decorateExportSprite(sprite:Sprite, m:Matrix, exportOptions:ExportOptions, canvas:CanvasComponent):void
Callback that allows additional painting on the sprite that will be exported as a bitmap.
AbstractImageExportHandler
 Inherited
encodeBitmap(bitmap:BitmapData):ByteArray
Encodes the given bitmap data to a byte array.
AbstractImageExportHandler
  
exportCore(canvas:CanvasComponent, defaultFileName:String, exportOptions:ExportOptions = null, canvasSprite:Sprite = null):void
[override] Creates the image file using method createImageAsByteArray and saves it using a file reference created by createFileReference.
ImageSaveHandler
 Inherited
getImageData(canvas:CanvasComponent, exportOptions:ExportOptions, canvasSprite:Sprite = null):BitmapData
Draws the canvas contents to a BitmapData instance.
AbstractImageExportHandler
 Inherited
onCancel(event:Event):void
Called when the user chose the cancel button of the download dialog.
AbstractImageExportHandler
 Inherited
onComplete(evt:Event):void
Called when the export operation has finished succesfully.
AbstractImageExportHandler
 Inherited
onHTTPStatus(evt:HTTPStatusEvent):void
Called when the server sends a HTTP status.
AbstractImageExportHandler
 Inherited
onIOError(evt:IOErrorEvent):void
Called when an IO error occurs while executing the image file download.
AbstractImageExportHandler
 Inherited
onProgress(evt:ProgressEvent):void
Dispatched periodically during the file upload or download operation.
AbstractImageExportHandler
 Inherited
onSecurityError(evt:SecurityErrorEvent):void
Called when a security error occurs while executing the image file download.
AbstractImageExportHandler
 Inherited
onSelect(evt:Event):void
Called when the user has selected a location for the image file download.
AbstractImageExportHandler
Method Detail
exportCore()method
override protected function exportCore(canvas:CanvasComponent, defaultFileName:String, exportOptions:ExportOptions = null, canvasSprite:Sprite = null):void

Creates the image file using method createImageAsByteArray and saves it using a file reference created by createFileReference.

This method is called by the export method.

Parameters

canvas:CanvasComponent — The canvas to create the image from.
 
defaultFileName:String — A default file name.
 
exportOptions:ExportOptions (default = null) — The export options.
 
canvasSprite:Sprite (default = null) — An optional pre-calculated sprite to create the image file from.