CImageFrame Class Reference
class CImageFrame : public CBase |
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.
Public Member Functions |
---|
| ~CImageFrame() |
IMPORT_C TDes8 & | Data() |
IMPORT_C const TDesC8 & | Data() |
IMPORT_C RChunk & | DataChunk() |
IMPORT_C TInt | DataOffset() |
IMPORT_C const TFrameFormatBase & | FrameFormat() |
IMPORT_C const TFrameLayoutBase & | FrameLayout() |
IMPORT_C const TSize & | FrameSizeInPixels() |
IMPORT_C TBool | IsChunk() |
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 &) |
IMPORT_C void | SetFrameFormatL(const TFrameFormatBase &) |
IMPORT_C void | SetFrameLayoutL(const TFrameLayoutBase &) |
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 &) |
Private Attributes |
---|
CBody * | iBody |
Constructor & Destructor Documentation
CImageFrame()
IMPORT_C | CImageFrame | ( | ) | [protected] |
Member Functions Documentation
ConstructL(const TDes8 &, TInt)
IMPORT_C void | ConstructL | ( | const TDes8 & | aBuffer, |
| TInt | aMaxBufferSize |
| ) | [protected] |
Function used to initialise a CImageFrame object encapsulating a descriptor.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const TDes8 & aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
ConstructL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
Function used to initialise a CImageFrame object encapsulating a descriptor.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const TDes8 & aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
const TSize & aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
const TFrameFormatBase & aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
ConstructL(const RChunk *, TInt, TInt)
IMPORT_C void | ConstructL | ( | const RChunk * | aBuffer, |
| TInt | aMaxBufferSize, |
| TInt | aDataOffset |
| ) | [protected] |
Function used to initialise a CImageFrame object encapsulating a chunk.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const RChunk * aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
TInt aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
ConstructL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
Function used to initialise a CImageFrame object encapsulating a chunk.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const RChunk * aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
TInt aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
const TSize & aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
const TFrameFormatBase & aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Data()
IMPORT_C TDes8 & | Data | ( | ) | [virtual] |
Provides a writeable TDes8 reference to the data buffer. The reference can be used for reading and writing the data.
Data()
IMPORT_C const TDesC8 & | Data | ( | ) | const [virtual] |
Provides a TDesC8 reference to the data buffer. The reference can only be used for reading the data.
DataChunk()
IMPORT_C RChunk & | DataChunk | ( | ) | [virtual] |
Returns a reference to the chunk encapsulated by the CImageFrame object.
Note:
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
- EInvalidValue if the CImageFrame object does not encapsulate an RChunk.
DataOffset()
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.
FrameSizeInPixels()
IMPORT_C const TSize & | FrameSizeInPixels | ( | ) | const [virtual] |
Returns the size in pixels of the image the CImageFrame refers to.
IsChunk()
IMPORT_C TBool | IsChunk | ( | ) | const [virtual] |
Returns whether CImageFrame object encapsulates a chunk.
MaxBufferSize()
IMPORT_C TInt | MaxBufferSize | ( | ) | const [virtual] |
Returns the maximum space reserved for this frame.
NewL(const TDes8 &, TInt)
Factory function used to create a CImageFrame object encapsulating a descriptor.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const TDes8 & aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
NewL(const TDes8 &, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
Factory function used to create a CImageFrame object encapsulating a descriptor.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const TDes8 & aBuffer | A reference to the TDes8 object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
const TSize & aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
const TFrameFormatBase & aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
NewL(const RChunk *, TInt, TInt)
Factory function used to create a CImageFrame object encapsulating a chunk.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const RChunk * aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
TInt aDataOffset | The offset in bytes at which the data for this frame starts. |
NewL(const RChunk *, TInt, TInt, const TSize &, const TFrameFormatBase &, const TFrameLayoutBase &)
Factory function used to create a CImageFrame object encapsulating a chunk.
-
leave
- KErrArgument
-
leave
- KErrNoMemory or other system wide error code.
Parameters
const RChunk * aBuffer | A pointer to the RChunk object encapsulated by the CImageFrame object. |
TInt aMaxBufferSize | The maximum space in bytes reserved for this frame. |
TInt aDataOffset | The offset in bytes at which the data for this frame starts from the chunk start. |
const TSize & aFrameSize | A reference to a TSize object that defines the frame size in pixels of the CImageFrame object. |
const TFrameFormatBase & aFrameFormat | A reference to a TFrameFormatBase object that defines the format of the CImageFrame object. |
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that defines the memory layout of the CImageFrame object. |
Reserved1()
IMPORT_C void | Reserved1 | ( | ) | [private, virtual] |
Reserved2()
IMPORT_C void | Reserved2 | ( | ) | [private, virtual] |
Reserved3()
IMPORT_C void | Reserved3 | ( | ) | [private, virtual] |
Reserved4()
IMPORT_C void | Reserved4 | ( | ) | [private, virtual] |
SetFrameFormatL(const TFrameFormatBase &)
Parameters
const TFrameFormatBase & aFormat | A reference to a TFrameFormatBase object that is used to set the format of the CImageFrame. |
SetFrameLayoutL(const TFrameLayoutBase &)
Parameters
const TFrameLayoutBase & aFrameLayout | A reference to a TFrameLayoutBase object that is used to set the memory layout of the CImageFrame object. |
SetFrameSizeInPixels(const TSize &)
IMPORT_C void | SetFrameSizeInPixels | ( | const TSize & | aFrameSize | ) | [virtual] |
Sets the size in pixels of the image CImageFrame refers to.
-
panic
- EInvalidValue if the framesize value is invalid.
Parameters
const TSize & aFrameSize | A reference to a TSize object used to set the image size (in pixels) for the CImageFrame object. |
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.