#include <imageframe.h>
class CImageFrame : public CBase |
Public Member Functions | |
---|---|
~CImageFrame() | |
virtual IMPORT_C TDes8 & | Data() |
virtual IMPORT_C const TDesC8 & | Data() |
virtual IMPORT_C RChunk & | DataChunk() |
virtual IMPORT_C TInt | DataOffset() |
virtual IMPORT_C const TFrameFormatBase & | FrameFormat() |
virtual IMPORT_C const TFrameLayoutBase & | FrameLayout() |
virtual IMPORT_C const TSize & | FrameSizeInPixels() |
virtual IMPORT_C TBool | IsChunk() |
virtual IMPORT_C TInt | MaxBufferSize() |
IMPORT_C CImageFrame * | NewL(const TDes8 &, TInt) |
IMPORT_C CImageFrame * | NewL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &) |
IMPORT_C CImageFrame * | NewL(const RChunk *, TInt, TInt) |
IMPORT_C CImageFrame * | NewL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &) |
virtual IMPORT_C void | SetFrameFormatL(const TFrameFormatBase &) |
virtual IMPORT_C void | SetFrameLayoutL(const TFrameLayoutBase &) |
virtual IMPORT_C void | SetFrameSizeInPixels(const TSize &) |
Protected Member Functions | |
---|---|
CImageFrame() | |
IMPORT_C void | ConstructL(const TDes8 &, TInt) |
IMPORT_C void | ConstructL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &) |
IMPORT_C void | ConstructL(const RChunk *, TInt, TInt) |
IMPORT_C void | ConstructL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &) |
CImageFrame class exposes an API for accessing binary image data in a uniform way. It is implemented as a wrapper around TDes8 or RChunk objects.
Function used to initialise a CImageFrame object encapsulating a descriptor.
Parameters | |
---|---|
aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C void | ConstructL | ( | const TDes8 & | aBuffer, |
TInt | aMaxBufferSize, | |||
const TSize & | aFrameSize, | |||
const TFrameFormatBase & | aFrameFormat, | |||
const TFrameLayoutBase & | aFrameLayout | |||
) | [protected] |
Function used to initialise a CImageFrame object encapsulating a descriptor.
Parameters | |
---|---|
aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
Function used to initialise a CImageFrame object encapsulating a chunk.
Parameters | |
---|---|
aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C void | ConstructL | ( | const RChunk * | aBuffer, |
TInt | aMaxBufferSize, | |||
TInt | aDataOffset, | |||
const TSize & | aFrameSize, | |||
const TFrameFormatBase & | aFrameFormat, | |||
const TFrameLayoutBase & | aFrameLayout | |||
) | [protected] |
Function used to initialise a CImageFrame object encapsulating a chunk.
Parameters | |
---|---|
aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C RChunk & | DataChunk | ( | ) | [virtual] |
Returns a reference to the chunk encapsulated by the CImageFrame object.
The function will panic if the object does not encapsulate an RChunk. Before calling this function call IsChunk() to check if the CImageFrame object encapsulates a chunk.
Panic Codes | |
---|---|
EInvalidValue | if the |
IMPORT_C TInt | DataOffset | ( | ) | const [virtual] |
Returns the offset at which the data for this frame starts. For CImageFrame objects encapsulating descriptors the offset is zero.
IMPORT_C const TFrameFormatBase & | FrameFormat | ( | ) | const [virtual] |
Returns the format of the CImageFrame object.
IMPORT_C const TFrameLayoutBase & | FrameLayout | ( | ) | const [virtual] |
Returns the memory layout of the CImageFrame object.
IMPORT_C const TSize & | FrameSizeInPixels | ( | ) | const [virtual] |
Returns the size in pixels of the image the CImageFrame refers to.
IMPORT_C TBool | IsChunk | ( | ) | const [virtual] |
Returns whether CImageFrame object encapsulates a chunk.
IMPORT_C TInt | MaxBufferSize | ( | ) | const [virtual] |
Returns the maximum space reserved for this frame.
IMPORT_C CImageFrame * | NewL | ( | const TDes8 & | aBuffer, |
TInt | aMaxBufferSize | |||
) | [static] |
Factory function used to create a CImageFrame object encapsulating a descriptor.
Parameters | |
---|---|
aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C CImageFrame * | NewL | ( | const TDes8 & | aBuffer, |
TInt | aMaxBufferSize, | |||
const TSize & | aFrameSize, | |||
const TFrameFormatBase & | aFrameFormat, | |||
const TFrameLayoutBase & | aFrameLayout | |||
) | [static] |
Factory function used to create a CImageFrame object encapsulating a descriptor.
Parameters | |
---|---|
aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C CImageFrame * | NewL | ( | const RChunk * | aBuffer, |
TInt | aMaxBufferSize, | |||
TInt | aDataOffset | |||
) | [static] |
Factory function used to create a CImageFrame object encapsulating a chunk.
Parameters | |
---|---|
aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aDataOffset | The offset in bytes at which the data for this frame starts. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C CImageFrame * | NewL | ( | const RChunk * | aBuffer, |
TInt | aMaxBufferSize, | |||
TInt | aDataOffset, | |||
const TSize & | aFrameSize, | |||
const TFrameFormatBase & | aFrameFormat, | |||
const TFrameLayoutBase & | aFrameLayout | |||
) | [static] |
Factory function used to create a CImageFrame object encapsulating a chunk.
Parameters | |
---|---|
aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
aMaxBufferSize | The maximum space in bytes reserved for this frame. |
aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrArgument | |
KErrNoMemory | or other system wide error code. |
IMPORT_C void | SetFrameFormatL | ( | const TFrameFormatBase & | aFormat | ) | [virtual] |
Sets the format of the CImageFrame object.
Parameters | |
---|---|
aFormat | A reference to a TFrameFormatBase object that is used to set the format of the CImageFrame. |
Leave Codes | |
---|---|
KErrNoMemory |
IMPORT_C void | SetFrameLayoutL | ( | const TFrameLayoutBase & | aFrameLayout | ) | [virtual] |
Sets the layout of the CImageFrame object.
Parameters | |
---|---|
aFrameLayout | A reference to a TFrameLayoutBase object that is used to set the memory layout of the CImageFrame object. |
Leave Codes | |
---|---|
KErrNoMemory |
IMPORT_C void | SetFrameSizeInPixels | ( | const TSize & | aFrameSize | ) | [virtual] |
Sets the size in pixels of the image CImageFrame refers to.
Parameters | |
---|---|
aFrameSize | A reference to a TSize object used to set the image size (in pixels) for the CImageFrame object. |
Panic Codes | |
---|---|
EInvalidValue | if the framesize value is invalid. |