| class SgUtils |
Set of utility functions. These functions are related to a number of Graphics APIs and provide functionality for converting from one pixel format to another, mapping from TDisplayMode to TUidPixelFormat and viceversa, and calculating data strides.
| Public Member Functions | |
|---|---|
| IMPORT_C TUidPixelFormat | DisplayModeToPixelFormat ( TDisplayMode ) |
| IMPORT_C TInt | MinDataStride ( TInt , TUidPixelFormat ) |
| IMPORT_C TDisplayMode | PixelFormatToDisplayMode ( TUidPixelFormat ) |
| IMPORT_C TInt | TransferPixels ( TAny *, TInt , TUidPixelFormat , const TAny *, TInt , TUidPixelFormat , const TRect &) |
| IMPORT_C TUidPixelFormat | DisplayModeToPixelFormat | ( | TDisplayMode | aDisplayMode | ) | [static] |
Convert from display mode to pixel format.
| TDisplayMode aDisplayMode | Display mode to convert. |
| IMPORT_C TInt | MinDataStride | ( | TInt | aWidth, |
| TUidPixelFormat | aPixelFormat | |||
| ) | [static] | |||
Calculates the minimum number of bytes between rows of data in a bi-dimensional pixel buffer. The returned value is not guaranteed to be aligned onto any boundary.
| TInt aWidth | Width in pixels of the buffer. |
| TUidPixelFormat aPixelFormat | Pixel format of the buffer. |
| IMPORT_C TDisplayMode | PixelFormatToDisplayMode | ( | TUidPixelFormat | aPixelFormat | ) | [static] |
Convert from pixel format to display mode.
| TUidPixelFormat aPixelFormat | Pixel format to convert. |
| IMPORT_C TInt | TransferPixels | ( | TAny * | aDataAddressDest, |
| TInt | aDataStrideDest, | |||
| TUidPixelFormat | aPixelFormatDest, | |||
| const TAny * | aDataAddressSrc, | |||
| TInt | aDataStrideSrc, | |||
| TUidPixelFormat | aPixelFormatSrc, | |||
| const TRect & | aRectSource | |||
| ) | [static] | |||
For the source: EUidPixelFormatRGB_565, EUidPixelFormatARGB_8888_PRE.
For the destination: EUidPixelFormatARGB_8888_PRE, EUidPixelFormatARGB_8888, EUidPixelFormatXRGB_8888, EUidPixelFormatRGB_888, EUidPixelFormatRGB_565, EUidPixelFormatXRGB_4444, EUidPixelFormatP_8, EUidPixelFormatL_8, EUidPixelFormatL_4, EUidPixelFormatP_4, EUidPixelFormatL_2, EUidPixelFormatL_1.
| TAny * aDataAddressDest | The base address of the destination pixel buffer. |
| TInt aDataStrideDest | The number of bytes between rows of data in the destination pixel buffer. |
| TUidPixelFormat aPixelFormatDest | Pixel format of the destination buffer. |
| const TAny * aDataAddressSrc | The base address of the source pixel buffer. |
| TInt aDataStrideSrc | The number of bytes between rows of data in the source pixel buffer. |
| TUidPixelFormat aPixelFormatSrc | Pixel format of the source buffer. |
| const TRect & aRectSource | Rectangle of the source pixel buffer which will be transferred to the destination pixel buffer. |
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.