SgUtils Class Reference
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.
Member Functions Documentation
DisplayModeToPixelFormat(TDisplayMode)
Convert from display mode to pixel format.
MinDataStride(TInt, TUidPixelFormat)
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.
Parameters
TInt aWidth | Width in pixels of the buffer. |
TUidPixelFormat aPixelFormat | Pixel format of the buffer. |
PixelFormatToDisplayMode(TUidPixelFormat)
Convert from pixel format to display mode.
TransferPixels(TAny *, TInt, TUidPixelFormat, const TAny *, TInt, TUidPixelFormat, const TRect &)
Transfer data from one bi-dimensional pixel buffer to another bi-dimensional pixel buffer with a different pixel format. The pixel format conversion may involve some data loss. This function currently supports the following pixel formats.
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.
Parameters
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.