Implemented by
gfxIImageFrame interface All x, y, width, height values are in pixels. @author Tim Rowley <tor@cs.brown.edu> @author Stuart Parmenter <pavlov@netscape.com> @version 0.1
[scriptable, uuid(f6d00ee7-defc-4101-b2dc-e72cf4c37c3c)]
interface gfxIImageFrame : nsISupports
Attributes
readonly attribute
unsigned long
alphaBytesPerRow
returns the number of bytes allocated for the alpha mask
readonly attribute
unsigned long
alphaDataLength
attribute
gfx_color
backgroundColor
The image data format the image was created with. @see gfxIFormats
readonly attribute
gfx_format
format
attribute
long
frameDisposalMethod
The height of the image.
readonly attribute
PRInt32
height
readonly attribute
unsigned long
imageBytesPerRow
returns the number of bytes allocated for the image
readonly attribute
unsigned long
imageDataLength
TRUE by default. When set to FALSE, you will no longer be able to make any modifications to the data of the image. Any attempts will fail.
attribute
boolean
mutable
returns whether the image requires the background to be painted
readonly attribute
boolean
needsBackground
Represents the number of milliseconds until the next frame should be displayed. @note -1 means that this frame should be displayed forever.
attribute
long
timeout
The width of the image.
readonly attribute
PRInt32
width
The x-offset of the image.
readonly attribute
PRInt32
x
The y-offset of the image.
readonly attribute
PRInt32
y
Methods
Blit this frame into another frame. Used for GIF animation compositing
void
drawTo(in gfxIImageFrame aDst, in PRInt32 aDX, in PRInt32 aDY, in PRInt32 aDWidth, in PRInt32 aDHeight)
void
getAlphaData([array, size_is(length)] out PRUint8 bits, out unsigned long length)
void
getImageData([array, size_is(length)] out PRUint8 bits, out unsigned long length)
The rectangle this frame ocupies. @param rect this is really an out parameter.
[noscript]
void
getRect(in nsRectRef rect)
Create a new a aWidth x a aHeight sized image. @param aX The x-offset from the origin of the gfxIImageContainer parent. @param aY The y-offset from the origin of the gfxIImageContainer parent. @param aWidth The width of the image to create. @param aHeight The height of the image to create. @param aFormat the width of the image to create. @note The data of a new image is unspecified (Whats the word i'm looking for here?).
void
init(in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfx_format aFormat, in gfx_depth aDepth)
Lock alpha pixels before addressing the data directly
void
lockAlphaData()
Lock image pixels before addressing the data directly
void
lockImageData()
Sets a length bytes of a data in this object.
void
setAlphaData([const, array, size_is(length)] in PRUint8 data, in unsigned long length, in long offset)
Sets a length bytes of a data in this object. @param offset The offset from the first pixel in bytes. To set data beginning with the first (top left) pixel in the image, a offset should be 0; to set data beginning with, for example, the sixth pixel in the first row of a RGBA32 image, the offset should be 20. @attension should we use PRUint32 instead?
void
setImageData([const, array, size_is(length)] in PRUint8 data, in unsigned long length, in long offset)
Unlock alpha pixels
void
unlockAlphaData()
Unlock image pixels
void
unlockImageData()
Compare to: