Package | org.purepdf.elements.images |
Class | public class ImageElement |
Inheritance | ImageElement RectangleElement Object |
Implements | IElement |
Subclasses | ImageRaw, ImageTemplate, ImageWMF, ImgCCITT, Jpeg |
Property | Defined By | ||
---|---|---|---|
absoluteX : Number [read-only] | ImageElement | ||
absoluteY : Number [read-only] | ImageElement | ||
additional : PdfDictionary | ImageElement | ||
alignment : int | ImageElement | ||
annotation : Annotation | ImageElement | ||
backgroundColor : RGBColor | RectangleElement | ||
border : int | RectangleElement | ||
borderColor : RGBColor | RectangleElement | ||
borderColorBottom : RGBColor | RectangleElement | ||
borderColorLeft : RGBColor | RectangleElement | ||
borderColorRight : RGBColor | RectangleElement | ||
borderColorTop : RGBColor | RectangleElement | ||
borderSides : int [write-only]
Enables/Disables the border on the specified sides. | RectangleElement | ||
borderWidth : Number | RectangleElement | ||
borderWidthBottom : Number | RectangleElement | ||
borderWidthLeft : Number | RectangleElement | ||
borderWidthRight : Number | RectangleElement | ||
borderWidthTop : Number | RectangleElement | ||
bpc : int [read-only] | ImageElement | ||
colorspace : int [read-only] | ImageElement | ||
compressionLevel : int | ImageElement | ||
deflated : Boolean | ImageElement | ||
directReference : PdfIndirectReference [read-only] | ImageElement | ||
grayFill : Number | RectangleElement | ||
hasAbsoluteX : Boolean [read-only] | ImageElement | ||
hasAbsoluteY : Boolean [read-only] | ImageElement | ||
height : Number [read-only] | RectangleElement | ||
imageMask : ImageElement | ImageElement | ||
imageRotation : Number [read-only]
Get the current Image rotation in radians
| ImageElement | ||
indentationLeft : Number [read-only] | ImageElement | ||
indentationRight : Number [read-only] | ImageElement | ||
isContent : Boolean [read-only] | RectangleElement | ||
isImgRaw : Boolean [read-only] | ImageElement | ||
isImgTemplate : Boolean [read-only] | ImageElement | ||
isInterpolated : Boolean [read-only] | ImageElement | ||
isInverted : Boolean | ImageElement | ||
isMask : Boolean [read-only] | ImageElement | ||
isNestable : Boolean [read-only] | RectangleElement | ||
isSmask : Boolean [read-only] | ImageElement | ||
layer : IPdfOCG [read-only] | ImageElement | ||
matrix : Vector.<Number> [read-only] | ImageElement | ||
mySerialId : Number [read-only] | ImageElement | ||
originalData : ByteArray | ImageElement | ||
originalType : int | ImageElement | ||
rawData : ByteArray [read-only] | ImageElement | ||
rotation : int [read-only] | RectangleElement | ||
scaledHeight : Number [read-only] | ImageElement | ||
scaledWidth : Number [read-only] | ImageElement | ||
spacingAfter : Number | ImageElement | ||
spacingBefore : Number | ImageElement | ||
templateData : PdfTemplate | ImageElement | ||
transparency : Vector.<int> | ImageElement | ||
type : int [override] [read-only] | ImageElement | ||
url : String | ImageElement | ||
useVariableBorders : Boolean [read-only] | RectangleElement | ||
width : Number [read-only] | RectangleElement | ||
widthPercentage : Number [read-only] | ImageElement | ||
xyRatio : Number | ImageElement |
Property | Defined By | ||
---|---|---|---|
_absoluteX : Number = NaN | ImageElement | ||
_absoluteY : Number = NaN | ImageElement | ||
_additional : PdfDictionary | ImageElement | ||
_alignment : int | ImageElement | ||
alt : String | ImageElement | ||
_annotation : Annotation = null | ImageElement | ||
_backgroundColor : RGBColor = null | RectangleElement | ||
_border : int = -1 | RectangleElement | ||
_borderColor : RGBColor = null | RectangleElement | ||
_borderColorBottom : RGBColor = null | RectangleElement | ||
_borderColorLeft : RGBColor = null | RectangleElement | ||
_borderColorRight : RGBColor = null | RectangleElement | ||
_borderColorTop : RGBColor = null | RectangleElement | ||
_borderWidth : Number = -1 | RectangleElement | ||
_borderWidthBottom : Number = -1 | RectangleElement | ||
_borderWidthLeft : Number = -1 | RectangleElement | ||
_borderWidthRight : Number = -1 | RectangleElement | ||
_borderWidthTop : Number = -1 | RectangleElement | ||
_bpc : int = 1 | ImageElement | ||
_colorspace : int = -1 | ImageElement | ||
_compressionLevel : int | ImageElement | ||
_deflated : Boolean = false | ImageElement | ||
dpiX : int = 0 | ImageElement | ||
dpiY : int = 0 | ImageElement | ||
_imageMask : ImageElement | ImageElement | ||
_indentationLeft : Number = 0 | ImageElement | ||
_indentationRight : Number = 0 | ImageElement | ||
initialRotation : Number = 0 | ImageElement | ||
_interpolation : Boolean | ImageElement | ||
_invert : Boolean = false | ImageElement | ||
_layer : IPdfOCG | ImageElement | ||
llx : Number | RectangleElement | ||
lly : Number | RectangleElement | ||
_mask : Boolean = false | ImageElement | ||
_mySerialId : Number | ImageElement | ||
_originalData : ByteArray | ImageElement | ||
_originalType : int = 0 | ImageElement | ||
plainHeight : Number | ImageElement | ||
plainWidth : Number | ImageElement | ||
_rawData : ByteArray | ImageElement | ||
_rotation : int = 0 | RectangleElement | ||
rotationRadians : Number | ImageElement | ||
_scaledHeight : Number | ImageElement | ||
_scaledWidth : Number | ImageElement | ||
serialId : Number = 0 [static] | ImageElement | ||
_smask : Boolean | ImageElement | ||
_spacingAfter : Number = 0 | ImageElement | ||
_spacingBefore : Number = 0 | ImageElement | ||
template : Vector.<PdfTemplate> | ImageElement | ||
_transparency : Vector.<int> | ImageElement | ||
_type : int | ImageElement | ||
_url : String | ImageElement | ||
urx : Number | RectangleElement | ||
ury : Number | RectangleElement | ||
_useVariableBorders : Boolean = false | RectangleElement | ||
_XYRatio : Number = 0 | ImageElement |
Method | Defined By | ||
---|---|---|---|
ImageElement(obj:Object) | ImageElement | ||
[static] | RectangleElement | ||
cloneNonPositionParameters(rect:RectangleElement):void | RectangleElement | ||
disableBorderSide(side:int):void | RectangleElement | ||
enableBorderSide(side:int):void | RectangleElement | ||
getBitmapDataInstance(data:BitmapData):ImageElement [static]
Create an ImageElement instance from a BitmapData. | ImageElement | ||
getBottom(margin:Number = 0):Number | RectangleElement | ||
getCCITTInstance(width:int, height:int, reverseBits:Boolean, typeCCITT:int, parameters:int, data:Bytes, transparency:Vector.<int>):ImageElement [static]
Creates an Image with CCITT G3 or G4 compression. | ImageElement | ||
getChunks():Vector.<Object> | RectangleElement | ||
[static] | ImageElement | ||
getInstance(buffer:ByteArray):ImageElement [static]
Create a new ImageElement instance from the passed image data
Currently allowed image types are: jpeg, png, gif (and animated gif), tiff
| ImageElement | ||
getLeft(margin:Number = 0):Number | RectangleElement | ||
getRawInstance(width:int, height:int, components:int, bpc:int, data:ByteArray, transparency:Vector.<int> = null):ImageElement [static] | ImageElement | ||
getRight(margin:Number = 0):Number | RectangleElement | ||
[static] | ImageElement | ||
getTop(margin:Number = 0):Number | RectangleElement | ||
hasBorder(borderType:int):Boolean | RectangleElement | ||
hasBorders():Boolean | RectangleElement | ||
initFromImageElement(other:ImageElement):void | ImageElement | ||
makeMask():void | ImageElement | ||
normalize():void
Normalizes the rectangle. | RectangleElement | ||
process(listener:IElementListener):Boolean | RectangleElement | ||
rectangle(top:Number, bottom:Number):RectangleElement | RectangleElement | ||
rotate(value:uint = 90):RectangleElement
Return a new rotated RectangleElement ( rotation of the current
rectangle plus the value passed )
| RectangleElement | ||
scaleAbsolute(newWidth:Number, newHeight:Number):void
Scale the Image to an absolute width and height
| ImageElement | ||
scaleAbsoluteHeight(newHeight:Number):void
Scale the image to an absolute height
| ImageElement | ||
scaleAbsoluteWidth(newWidth:Number):void
Scale the image to an absolute width
| ImageElement | ||
scalePercent(percentX:Number, percentY:Number):void
Scale the width and the height of the Image to an absolute percentage
| ImageElement | ||
scaleToFit(fitWidth:Number, fitHeight:Number):void
Scales the Image to fit an absolute width and height. | ImageElement | ||
setAbsolutePosition(absX:Number, absY:Number):void
Set the absolute position of the Image
| ImageElement | ||
setBottom($lly:Number):void | RectangleElement | ||
setDpi(x:int, y:int):void | ImageElement | ||
setLeft($llx:Number):void | RectangleElement | ||
setRight($urx:Number):void | RectangleElement | ||
setRotation(r:Number):void
Set the rotation of the Image in radians
| ImageElement | ||
setRotationDegrees(deg:Number):void
Set the rotation of the Image in degrees
| ImageElement | ||
setTop($ury:Number):void | RectangleElement | ||
setWidthPercentage(value:Number):void | ImageElement | ||
softCloneNonPositionParameters(rect:RectangleElement):void
Copies each of the parameters, except the position
| RectangleElement | ||
toString():String | RectangleElement |
Method | Defined By | ||
---|---|---|---|
getSerialId():Number [static] Creates a new serial id. | ImageElement |
Constant | Defined By | ||
---|---|---|---|
ALL : int [static] | RectangleElement | ||
AX : int = 0 [static] | ImageElement | ||
AY : int = 1 [static] | ImageElement | ||
BOTTOM : int = 2 [static] | RectangleElement | ||
BOX : int = 15.0 [static] | RectangleElement | ||
BX : int = 2 [static] | ImageElement | ||
BY : int = 3 [static] | ImageElement | ||
CCITT_BLACKIS1 : int = 1 [static] | ImageElement | ||
CCITT_ENCODEDBYTEALIGN : int = 2 [static] | ImageElement | ||
CCITT_ENDOFBLOCK : int = 8 [static] | ImageElement | ||
CCITT_ENDOFLINE : int = 4 [static] | ImageElement | ||
CCITTG3_1D : int = 0x101 [static] | ImageElement | ||
CCITTG3_2D : int = 0x102 [static] | ImageElement | ||
CCITTG4 : int = 0x100 [static] | ImageElement | ||
CX : int = 4 [static] | ImageElement | ||
CY : int = 5 [static] | ImageElement | ||
DEFAULT : int = 0 [static] | ImageElement | ||
DX : int = 6 [static] | ImageElement | ||
DY : int = 7 [static] | ImageElement | ||
LEFT : int = 0 [static] | ImageElement | ||
MIDDLE : int = 1 [static] | ImageElement | ||
NO_BORDER : int = 0 [static] | RectangleElement | ||
ORIGINAL_BMP : int = 4 [static] | ImageElement | ||
ORIGINAL_GIF : int = 3 [static] | ImageElement | ||
ORIGINAL_JBIG2 : int = 9 [static] | ImageElement | ||
ORIGINAL_JPEG : int = 1 [static] | ImageElement | ||
ORIGINAL_JPEG2000 : int = 8 [static] | ImageElement | ||
ORIGINAL_NONE : int = 0 [static] | ImageElement | ||
ORIGINAL_PNG : int = 2 [static] | ImageElement | ||
ORIGINAL_PS : int = 7 [static] | ImageElement | ||
ORIGINAL_TIFF : int = 5 [static] | ImageElement | ||
ORIGINAL_WMF : int = 6 [static] | ImageElement | ||
RIGHT : int = 2 [static] | ImageElement | ||
TEXTWRAP : int = 4 [static] | ImageElement | ||
TOP : int = 1 [static] | RectangleElement | ||
UNDEFINED : int = -1 [static] | RectangleElement | ||
UNDERLYING : int = 8 [static] | ImageElement |
_absoluteX | property |
protected var _absoluteX:Number = NaN
_absoluteY | property |
protected var _absoluteY:Number = NaN
_additional | property |
protected var _additional:PdfDictionary
_alignment | property |
protected var _alignment:int
_annotation | property |
protected var _annotation:Annotation = null
_bpc | property |
protected var _bpc:int = 1
_colorspace | property |
protected var _colorspace:int = -1
_compressionLevel | property |
protected var _compressionLevel:int
_deflated | property |
protected var _deflated:Boolean = false
_imageMask | property |
protected var _imageMask:ImageElement
_indentationLeft | property |
protected var _indentationLeft:Number = 0
_indentationRight | property |
protected var _indentationRight:Number = 0
_interpolation | property |
protected var _interpolation:Boolean
_invert | property |
protected var _invert:Boolean = false
_layer | property |
protected var _layer:IPdfOCG
_mask | property |
protected var _mask:Boolean = false
_mySerialId | property |
protected var _mySerialId:Number
_originalData | property |
protected var _originalData:ByteArray
_originalType | property |
protected var _originalType:int = 0
_rawData | property |
protected var _rawData:ByteArray
_scaledHeight | property |
protected var _scaledHeight:Number
_scaledWidth | property |
protected var _scaledWidth:Number
_smask | property |
protected var _smask:Boolean
_spacingAfter | property |
protected var _spacingAfter:Number = 0
_spacingBefore | property |
protected var _spacingBefore:Number = 0
_transparency | property |
protected var _transparency:Vector.<int>
_type | property |
protected var _type:int
_url | property |
protected var _url:String
_XYRatio | property |
protected var _XYRatio:Number = 0
absoluteX | property |
absoluteX:Number
[read-only] public function get absoluteX():Number
absoluteY | property |
absoluteY:Number
[read-only] public function get absoluteY():Number
additional | property |
additional:PdfDictionary
public function get additional():PdfDictionary
public function set additional(value:PdfDictionary):void
alignment | property |
alignment:int
public function get alignment():int
public function set alignment(value:int):void
alt | property |
protected var alt:String
annotation | property |
annotation:Annotation
public function get annotation():Annotation
public function set annotation(value:Annotation):void
bpc | property |
bpc:int
[read-only] public function get bpc():int
colorspace | property |
colorspace:int
[read-only] public function get colorspace():int
compressionLevel | property |
compressionLevel:int
public function get compressionLevel():int
public function set compressionLevel(value:int):void
deflated | property |
deflated:Boolean
public function get deflated():Boolean
public function set deflated(value:Boolean):void
directReference | property |
directReference:PdfIndirectReference
[read-only] public function get directReference():PdfIndirectReference
dpiX | property |
protected var dpiX:int = 0
dpiY | property |
protected var dpiY:int = 0
hasAbsoluteX | property |
hasAbsoluteX:Boolean
[read-only] public function get hasAbsoluteX():Boolean
hasAbsoluteY | property |
hasAbsoluteY:Boolean
[read-only] public function get hasAbsoluteY():Boolean
imageMask | property |
imageMask:ImageElement
public function get imageMask():ImageElement
public function set imageMask(value:ImageElement):void
imageRotation | property |
imageRotation:Number
[read-only] Get the current Image rotation in radians
public function get imageRotation():Number
indentationLeft | property |
indentationLeft:Number
[read-only] public function get indentationLeft():Number
indentationRight | property |
indentationRight:Number
[read-only] public function get indentationRight():Number
initialRotation | property |
protected var initialRotation:Number = 0
isImgRaw | property |
isImgRaw:Boolean
[read-only] public function get isImgRaw():Boolean
isImgTemplate | property |
isImgTemplate:Boolean
[read-only] public function get isImgTemplate():Boolean
isInterpolated | property |
isInterpolated:Boolean
[read-only] public function get isInterpolated():Boolean
isInverted | property |
isInverted:Boolean
public function get isInverted():Boolean
public function set isInverted(value:Boolean):void
isMask | property |
isMask:Boolean
[read-only] public function get isMask():Boolean
isSmask | property |
isSmask:Boolean
[read-only] public function get isSmask():Boolean
layer | property |
matrix | property |
matrix:Vector.<Number>
[read-only] public function get matrix():Vector.<Number>
mySerialId | property |
mySerialId:Number
[read-only] public function get mySerialId():Number
originalData | property |
originalData:ByteArray
public function get originalData():ByteArray
public function set originalData(value:ByteArray):void
originalType | property |
originalType:int
public function get originalType():int
public function set originalType(value:int):void
plainHeight | property |
protected var plainHeight:Number
plainWidth | property |
protected var plainWidth:Number
rawData | property |
rawData:ByteArray
[read-only] public function get rawData():ByteArray
rotationRadians | property |
protected var rotationRadians:Number
scaledHeight | property |
scaledHeight:Number
[read-only] public function get scaledHeight():Number
scaledWidth | property |
scaledWidth:Number
[read-only] public function get scaledWidth():Number
serialId | property |
protected static var serialId:Number = 0
spacingAfter | property |
spacingAfter:Number
public function get spacingAfter():Number
public function set spacingAfter(value:Number):void
spacingBefore | property |
spacingBefore:Number
public function get spacingBefore():Number
public function set spacingBefore(value:Number):void
template | property |
protected var template:Vector.<PdfTemplate>
templateData | property |
templateData:PdfTemplate
public function get templateData():PdfTemplate
public function set templateData(value:PdfTemplate):void
transparency | property |
transparency:Vector.<int>
public function get transparency():Vector.<int>
public function set transparency(value:Vector.<int>):void
type | property |
type:int
[read-only] [override] public function get type():int
url | property |
url:String
public function get url():String
public function set url(value:String):void
widthPercentage | property |
widthPercentage:Number
[read-only] public function get widthPercentage():Number
xyRatio | property |
xyRatio:Number
public function get xyRatio():Number
public function set xyRatio(value:Number):void
ImageElement | () | Constructor |
public function ImageElement(obj:Object)
obj:Object |
getBitmapDataInstance | () | method |
public static function getBitmapDataInstance(data:BitmapData):ImageElement
Create an ImageElement instance from a BitmapData. The image will be encoded using a TIFF encoder and compressed into a raw bytearray
Parameters
data:BitmapData |
ImageElement |
getCCITTInstance | () | method |
public static function getCCITTInstance(width:int, height:int, reverseBits:Boolean, typeCCITT:int, parameters:int, data:Bytes, transparency:Vector.<int>):ImageElement
Creates an Image with CCITT G3 or G4 compression. It assumes that the data bytes are already compressed.
Parameters
width:int — the exact width of the image
| |
height:int — the exact height of the image
| |
reverseBits:Boolean — reverses the bits in data . Bit 0 is swapped
with bit 7 and so on
| |
typeCCITT:int — the type of compression in data . It can be
CCITTG4, CCITTG31D, CCITTG32D
| |
parameters:int — parameters associated with this stream. Possible values are
CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFLINE and
CCITT_ENDOFBLOCK or a combination of them
| |
data:Bytes | |
transparency:Vector.<int> |
ImageElement |
BadElementError
|
getImageInstance | () | method |
public static function getImageInstance(image:ImageElement):ImageElement
Parameters
image:ImageElement |
ImageElement |
getInstance | () | method |
public static function getInstance(buffer:ByteArray):ImageElement
Create a new ImageElement instance from the passed image data Currently allowed image types are: jpeg, png, gif (and animated gif), tiff
Parameters
buffer:ByteArray |
ImageElement |
getRawInstance | () | method |
public static function getRawInstance(width:int, height:int, components:int, bpc:int, data:ByteArray, transparency:Vector.<int> = null):ImageElement
Parameters
width:int | |
height:int | |
components:int | |
bpc:int | |
data:ByteArray | |
transparency:Vector.<int> (default = null )
|
ImageElement |
getSerialId | () | method |
protected static function getSerialId():Number
Creates a new serial id.
ReturnsNumber |
getTemplateInstance | () | method |
public static function getTemplateInstance(template:PdfTemplate):ImageElement
Parameters
template:PdfTemplate |
ImageElement |
initFromImageElement | () | method |
makeMask | () | method |
public function makeMask():void
scaleAbsolute | () | method |
public function scaleAbsolute(newWidth:Number, newHeight:Number):void
Scale the Image to an absolute width and height
Parameters
newWidth:Number — the new image width
| |
newHeight:Number — the new image height
|
scaleAbsoluteHeight | () | method |
public function scaleAbsoluteHeight(newHeight:Number):void
Scale the image to an absolute height
Parameters
newHeight:Number |
scaleAbsoluteWidth | () | method |
public function scaleAbsoluteWidth(newWidth:Number):void
Scale the image to an absolute width
Parameters
newWidth:Number |
scalePercent | () | method |
public function scalePercent(percentX:Number, percentY:Number):void
Scale the width and the height of the Image to an absolute percentage
Parameters
percentX:Number | |
percentY:Number |
scaleToFit | () | method |
public function scaleToFit(fitWidth:Number, fitHeight:Number):void
Scales the Image to fit an absolute width and height.
Parameters
fitWidth:Number | |
fitHeight:Number |
setAbsolutePosition | () | method |
public function setAbsolutePosition(absX:Number, absY:Number):void
Set the absolute position of the Image
Parameters
absX:Number | |
absY:Number |
setDpi | () | method |
public function setDpi(x:int, y:int):void
Parameters
x:int | |
y:int |
setRotation | () | method |
public function setRotation(r:Number):void
Set the rotation of the Image in radians
Parameters
r:Number — rotation in radians
|
setRotationDegrees | () | method |
public function setRotationDegrees(deg:Number):void
Set the rotation of the Image in degrees
Parameters
deg:Number — rotation in degrees
|
setWidthPercentage | () | method |
public function setWidthPercentage(value:Number):void
Parameters
value:Number |
AX | Constant |
public static const AX:int = 0
AY | Constant |
public static const AY:int = 1
BX | Constant |
public static const BX:int = 2
BY | Constant |
public static const BY:int = 3
CCITT_BLACKIS1 | Constant |
public static const CCITT_BLACKIS1:int = 1
CCITT_ENCODEDBYTEALIGN | Constant |
public static const CCITT_ENCODEDBYTEALIGN:int = 2
CCITT_ENDOFBLOCK | Constant |
public static const CCITT_ENDOFBLOCK:int = 8
CCITT_ENDOFLINE | Constant |
public static const CCITT_ENDOFLINE:int = 4
CCITTG3_1D | Constant |
public static const CCITTG3_1D:int = 0x101
CCITTG3_2D | Constant |
public static const CCITTG3_2D:int = 0x102
CCITTG4 | Constant |
public static const CCITTG4:int = 0x100
CX | Constant |
public static const CX:int = 4
CY | Constant |
public static const CY:int = 5
DEFAULT | Constant |
public static const DEFAULT:int = 0
DX | Constant |
public static const DX:int = 6
DY | Constant |
public static const DY:int = 7
LEFT | Constant |
public static const LEFT:int = 0
MIDDLE | Constant |
public static const MIDDLE:int = 1
ORIGINAL_BMP | Constant |
public static const ORIGINAL_BMP:int = 4
ORIGINAL_GIF | Constant |
public static const ORIGINAL_GIF:int = 3
ORIGINAL_JBIG2 | Constant |
public static const ORIGINAL_JBIG2:int = 9
ORIGINAL_JPEG | Constant |
public static const ORIGINAL_JPEG:int = 1
ORIGINAL_JPEG2000 | Constant |
public static const ORIGINAL_JPEG2000:int = 8
ORIGINAL_NONE | Constant |
public static const ORIGINAL_NONE:int = 0
ORIGINAL_PNG | Constant |
public static const ORIGINAL_PNG:int = 2
ORIGINAL_PS | Constant |
public static const ORIGINAL_PS:int = 7
ORIGINAL_TIFF | Constant |
public static const ORIGINAL_TIFF:int = 5
ORIGINAL_WMF | Constant |
public static const ORIGINAL_WMF:int = 6
RIGHT | Constant |
public static const RIGHT:int = 2
TEXTWRAP | Constant |
public static const TEXTWRAP:int = 4
UNDERLYING | Constant |
public static const UNDERLYING:int = 8