Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes
gfxImageFrame Class Reference

#include <gfxImageFrame.h>

Inheritance diagram for gfxImageFrame:
Inheritance graph
[legend]
Collaboration diagram for gfxImageFrame:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_GFXIIMAGEFRAME
NS_DECL_NSIINTERFACEREQUESTOR 
gfxImageFrame ()
virtual ~gfxImageFrame ()
void init (in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfx_format aFormat, in gfx_depth aDepth)
 Create a new aWidth x aHeight sized image.
void getRect (in nsRectRef rect)
 The rectangle this frame ocupies.
void getImageData ([array, size_is(length)] out PRUint8 bits, out unsigned long length)
void setImageData ([array, size_is(length), const ] in PRUint8 data, in unsigned long length, in long offset)
 Sets length bytes of data in this object.
void lockImageData ()
 Lock image pixels before addressing the data directly.
void unlockImageData ()
 Unlock image pixels.
void getAlphaData ([array, size_is(length)] out PRUint8 bits, out unsigned long length)
void setAlphaData ([array, size_is(length), const ] in PRUint8 data, in unsigned long length, in long offset)
 Sets length bytes of data in this object.
void lockAlphaData ()
 Lock alpha pixels before addressing the data directly.
void unlockAlphaData ()
 Unlock alpha pixels.
void drawTo (in gfxIImageFrame aDst, in PRInt32 aDX, in PRInt32 aDY, in PRInt32 aDWidth, in PRInt32 aDHeight)
 Blit this frame into another frame.
void getInterface (in nsIIDRef uuid,[iid_is(uuid), retval] out nsQIResult result)
 Retrieves the specified interface pointer.

Public Attributes

attribute boolean mutable
 TRUE by default.
readonly attribute PRInt32 x
 The x-offset of the image.
readonly attribute PRInt32 y
 The y-offset of the image.
readonly attribute PRInt32 width
 The width of the image.
readonly attribute PRInt32 height
 The height of the image.
readonly attribute gfx_format format
 The image data format the image was created with.
readonly attribute boolean needsBackground
 returns whether the image requires the background to be painted
readonly attribute unsigned long imageBytesPerRow
readonly attribute unsigned long imageDataLength
 returns the number of bytes allocated for the image
readonly attribute unsigned long alphaBytesPerRow
readonly attribute unsigned long alphaDataLength
 returns the number of bytes allocated for the alpha mask
attribute long timeout
 Represents the number of milliseconds until the next frame should be displayed.
attribute long frameDisposalMethod
attribute gfx_color backgroundColor

Protected Attributes

nsIntSize mSize

Private Attributes

nsCOMPtr< nsIImagemImage
PRPackedBool mInitalized
PRPackedBool mMutable
PRPackedBool mHasBackgroundColor
gfx_format mFormat
PRInt32 mTimeout
nsIntPoint mOffset
gfx_color mBackgroundColor
PRInt32 mDisposalMethod

Detailed Description

Definition at line 59 of file gfxImageFrame.h.


Constructor & Destructor Documentation

Definition at line 45 of file gfxImageFrame.cpp.

                             :
  mInitalized(PR_FALSE),
  mMutable(PR_TRUE),
  mHasBackgroundColor(PR_FALSE),
  mTimeout(100),
  mBackgroundColor(0),
  mDisposalMethod(0)
{
  /* member initializers and constructor code */
}

Definition at line 56 of file gfxImageFrame.cpp.

{
  /* destructor code */
}

Member Function Documentation

void gfxIImageFrame::drawTo ( in gfxIImageFrame  aDst,
in PRInt32  aDX,
in PRInt32  aDY,
in PRInt32  aDWidth,
in PRInt32  aDHeight 
) [inherited]

Blit this frame into another frame.

Used for GIF animation compositing

void gfxIImageFrame::getAlphaData ( [array, size_is(length)] out PRUint8  bits,
out unsigned long  length 
) [inherited]
void gfxIImageFrame::getImageData ( [array, size_is(length)] out PRUint8  bits,
out unsigned long  length 
) [inherited]
void nsIInterfaceRequestor::getInterface ( in nsIIDRef  uuid,
[iid_is(uuid), retval] out nsQIResult  result 
) [inherited]

Retrieves the specified interface pointer.

Parameters:
uuidThe IID of the interface being requested.
result[out] The interface pointer to be filled in if the interface is accessible.
Returns:
NS_OK - interface was successfully returned. NS_NOINTERFACE - interface not accessible. NS_ERROR* - method failure.
void gfxIImageFrame::getRect ( in nsRectRef  rect) [inherited]

The rectangle this frame ocupies.

Parameters:
rectthis is really an out parameter.
void gfxIImageFrame::init ( in PRInt32  aX,
in PRInt32  aY,
in PRInt32  aWidth,
in PRInt32  aHeight,
in gfx_format  aFormat,
in gfx_depth  aDepth 
) [inherited]

Create a new aWidth x aHeight sized image.

Parameters:
aXThe x-offset from the origin of the gfxIImageContainer parent.
aYThe y-offset from the origin of the gfxIImageContainer parent.
aWidthThe width of the image to create.
aHeightThe height of the image to create.
aFormatthe width of the image to create.
Note:
The data of a new image is unspecified (Whats the word i'm looking for here?).

Lock alpha pixels before addressing the data directly.

Lock image pixels before addressing the data directly.

void gfxIImageFrame::setAlphaData ( [array, size_is(length), const ] in PRUint8  data,
in unsigned long  length,
in long  offset 
) [inherited]

Sets length bytes of data in this object.

void gfxIImageFrame::setImageData ( [array, size_is(length), const ] in PRUint8  data,
in unsigned long  length,
in long  offset 
) [inherited]

Sets length bytes of data in this object.

Parameters:
offsetThe offset from the first pixel in bytes. To set data beginning with the first (top left) pixel in the image, 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. should we use PRUint32 instead?

Unlock alpha pixels.

Unlock image pixels.


Member Data Documentation

readonly attribute unsigned long gfxIImageFrame::alphaBytesPerRow [inherited]

Definition at line 160 of file gfxIImageFrame.idl.

readonly attribute unsigned long gfxIImageFrame::alphaDataLength [inherited]

returns the number of bytes allocated for the alpha mask

Definition at line 165 of file gfxIImageFrame.idl.

Definition at line 215 of file gfxIImageFrame.idl.

The image data format the image was created with.

See also:
gfxIFormats

Definition at line 117 of file gfxIImageFrame.idl.

Definition at line 210 of file gfxIImageFrame.idl.

The height of the image.

Definition at line 105 of file gfxIImageFrame.idl.

readonly attribute unsigned long gfxIImageFrame::imageBytesPerRow [inherited]

Definition at line 125 of file gfxIImageFrame.idl.

readonly attribute unsigned long gfxIImageFrame::imageDataLength [inherited]

returns the number of bytes allocated for the image

Definition at line 130 of file gfxIImageFrame.idl.

Definition at line 85 of file gfxImageFrame.h.

Definition at line 87 of file gfxImageFrame.h.

Definition at line 80 of file gfxImageFrame.h.

Definition at line 79 of file gfxImageFrame.h.

Definition at line 75 of file gfxImageFrame.h.

Definition at line 77 of file gfxImageFrame.h.

Definition at line 78 of file gfxImageFrame.h.

Definition at line 83 of file gfxImageFrame.h.

Definition at line 71 of file gfxImageFrame.h.

Definition at line 82 of file gfxImageFrame.h.

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.

Definition at line 85 of file gfxIImageFrame.idl.

returns whether the image requires the background to be painted

Definition at line 122 of file gfxIImageFrame.idl.

Represents the number of milliseconds until the next frame should be displayed.

Note:
-1 means that this frame should be displayed forever.

Definition at line 204 of file gfxIImageFrame.idl.

readonly attribute PRInt32 gfxIImageFrame::width [inherited]

The width of the image.

Definition at line 100 of file gfxIImageFrame.idl.

readonly attribute PRInt32 gfxIImageFrame::x [inherited]

The x-offset of the image.

Definition at line 90 of file gfxIImageFrame.idl.

readonly attribute PRInt32 gfxIImageFrame::y [inherited]

The y-offset of the image.

Definition at line 95 of file gfxIImageFrame.idl.


The documentation for this class was generated from the following files: