Pacote | mx.graphics |
Classe | public dynamic class ImageSnapshot |
Herança | ImageSnapshot Object |
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
flash.display.IBitmapDrawable
,
including Flex UIComponents.
An instance of this class can be sent as a RemoteObject
to Adobe's LiveCycle Data Services to generate
a PDF file of a client-side image.
If you need to specify additional properties of the image
beyond its contentType
, width
,
and height
properties, you should set name/value pairs
on the properties
object.
In earlier versions of Flex, you set these additional properties on the ImageSnapshot instance itself. This class is still dynamic in order to allow that, but in a future version of Flex it might no longer be dynamic.
Propriedade | Definido por | ||
---|---|---|---|
constructor : Object
Uma referência ao objeto de classe ou à função de construtor de uma determinada ocorrência de objeto. | Object | ||
contentType : String
The MIME content type for the image encoding format
that was used to capture this snapshot. | ImageSnapshot | ||
data : ByteArray
The encoded data representing the image snapshot. | ImageSnapshot | ||
defaultEncoder : Class [estático]
The default mx.graphics.codec.IImageEncoder implementation
used to capture images. | ImageSnapshot | ||
height : int
The image height in pixels. | ImageSnapshot | ||
properties : Object
An Object containing name/value pairs
specifying additional properties of the image. | ImageSnapshot | ||
width : int
The image width in pixels. | ImageSnapshot |
Método | Definido por | ||
---|---|---|---|
Constructor. | ImageSnapshot | ||
captureBitmapData(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:flash.geom:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):BitmapData [estático]
A utility method to grab a raw snapshot of a UI component as BitmapData. | ImageSnapshot | ||
captureImage(source:IBitmapDrawable, dpi:Number = 0, encoder:IImageEncoder = null, scaleLimited:Boolean = true):ImageSnapshot [estático]
A utility method to grab a snapshot of a component, scaled to a specific
resolution (in dpi) and encoded into a specific image format. | ImageSnapshot | ||
[estático]
A utility method to convert an ImageSnapshot into a Base-64 encoded
String for transmission in text based serialization formats such as XML. | ImageSnapshot | ||
Indica se um objeto tem uma propriedade especificada definida. | Object | ||
Indica se uma ocorrência da classe Object está na cadeia de protótipos do objeto especificado como o parâmetro. | Object | ||
Indica se a propriedade especificada existe e é enumerável. | Object | ||
Define a disponibilidade de uma propriedade dinâmica para operações de repetição. | Object | ||
Retorna a representação da string deste objeto, formatado segundo as convenções específicas para a localidade. | Object | ||
Retorna a representação de string do objeto especificado. | Object | ||
Retorna o valor primitivo do objeto especificado. | Object |
Constante | Definido por | ||
---|---|---|---|
MAX_BITMAP_DIMENSION : int = 2880 [estático]
The maximum width and height of a Bitmap. | ImageSnapshot |
contentType | propriedade |
contentType:String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The MIME content type for the image encoding format that was used to capture this snapshot. For PNG format images, the MIME type is "image/png". For JPG or JPEG images, the MIME type is "image/jpeg"
Implementação
public function get contentType():String
public function set contentType(value:String):void
data | propriedade |
defaultEncoder | propriedade |
public static var defaultEncoder:Class
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The default mx.graphics.codec.IImageEncoder
implementation
used to capture images. The two implementations are PNGEncoder and
JPEGEncoder. The default encoder uses the PNG format.
height | propriedade |
properties | propriedade |
properties:Object
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
An Object containing name/value pairs specifying additional properties of the image.
You generally supply such information only when sending an ImageSnapshot instance to Adobe's LiveCycle Data Services in order to generate a PDF file. You can either set the entire object or set individual name/value pairs on the pre-existing empty Object.
O valor padrão é {}.
Implementação
public function get properties():Object
public function set properties(value:Object):void
width | propriedade |
ImageSnapshot | () | Construtor |
public function ImageSnapshot(width:int = 0, height:int = 0, data:ByteArray = null, contentType:String = null)
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
Constructor.
Parâmetroswidth:int (default = 0 ) — Width of the image.
| |
height:int (default = 0 ) — Height of the image.
| |
data:ByteArray (default = null ) — A byte array to contain the image.
| |
contentType:String (default = null ) — The encoder format type for the image,
either PNGEncoder or JPEGEncoder.
|
captureBitmapData | () | método |
public static function captureBitmapData(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:flash.geom:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):BitmapData
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
A utility method to grab a raw snapshot of a UI component as BitmapData.
Parâmetros
source:IBitmapDrawable — An object that implements the
flash.display.IBitmapDrawable interface.
| |
matrix:Matrix (default = null ) — A Matrix object used to scale, rotate, or translate
the coordinates of the captured bitmap.
If you do not want to apply a matrix transformation to the image,
set this parameter to an identity matrix,
created with the default new Matrix() constructor, or pass a null value.
| |
colorTransform:flash.geom:ColorTransform (default = null ) — A ColorTransform
object that you use to adjust the color values of the bitmap. If no object
is supplied, the bitmap image's colors are not transformed. If you must pass
this parameter but you do not want to transform the image, set this parameter
to a ColorTransform object created with the default new ColorTransform() constructor.
| |
blendMode:String (default = null ) — A string value, from the flash.display.BlendMode
class, specifying the blend mode to be applied to the resulting bitmap.
| |
clipRect:Rectangle (default = null ) — A Rectangle object that defines the
area of the source object to draw. If you do not supply this value, no clipping
occurs and the entire source object is drawn.
| |
smoothing:Boolean (default = false ) — A Boolean value that determines whether a
BitmapData object is smoothed when scaled.
|
BitmapData — A BitmapData object representing the captured snapshot or null if
the source has no visible bounds.
|
captureImage | () | método |
public static function captureImage(source:IBitmapDrawable, dpi:Number = 0, encoder:IImageEncoder = null, scaleLimited:Boolean = true):ImageSnapshot
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
A utility method to grab a snapshot of a component, scaled to a specific resolution (in dpi) and encoded into a specific image format.
Parâmetros
source:IBitmapDrawable — An object that implements the
flash.display.IBitmapDrawable interface.
| |
dpi:Number (default = 0 ) — The resolution in dots per inch.
If a resolution is not provided,
the current on-screen resolution is used by default.
| |
encoder:IImageEncoder (default = null ) — The image format used to encode the raw bitmap. The two
encoders are PNGEncoder and JPEGEncoder. If an encoder is not provided,
the default is PNGEncoder.
| |
scaleLimited:Boolean (default = true ) — The maximum width or height of a bitmap in Flash
is 2880 pixels - if scaleLimited is set to true the resolution will be
reduced proportionately to fit within 2880 pixels, otherwise, if
scaleLimited is false, smaller snapshot windows will be taken and
stitched together to capture a larger image.
The default is true.
|
ImageSnapshot — An ImageSnapshot holding an encoded captured snapshot
and associated image metadata.
|
encodeImageAsBase64 | () | método |
public static function encodeImageAsBase64(snapshot:ImageSnapshot):String
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
A utility method to convert an ImageSnapshot into a Base-64 encoded String for transmission in text based serialization formats such as XML.
Parâmetros
snapshot:ImageSnapshot — An image captured as an
mx.graphics.ImageSnapshot .
|
String — A string representing the base64 encoded snapshot.
|
Elementos da API relacionados
MAX_BITMAP_DIMENSION | Constante |
public static const MAX_BITMAP_DIMENSION:int = 2880
Versão da linguagem: | ActionScript 3.0 |
Versão de produto: | Flex 3 |
Versões de runtime: | Flash Player 9, AIR 1.1 |
The maximum width and height of a Bitmap.
Wed Jun 13 2018, 11:10 AM Z