|
||
class TBitmapUtil;
Provides fast read/write access to the pixel data of a bitmap.
Functionality includes getting and setting the individual pixels of a bitmap. Common to this is the concept of the current pixel position. This is held as member data and is changed by using various efficient functions. For example, incrementing the position's x- or y co-ordinate is much quicker than setting a completely new position. This efficiency issue is important as these functions are used as part of the frequently used blitting DDA used for creating stretched or compressed versions of bitmaps.
Calls to TBitmapUtil::Begin(const TPoint &)
and TBitmapUtil::End()
must surround any calls to the other member functions. Note that you should always ensure each TBitmapUtil::Begin(const TPoint &)
is matched by an TBitmapUtil::End()
call when using this class.
Note also that all display modes including EColor16M are supported, but the TDisplayMode values ERgb and ENone are not considered to be display modes.
Defined in TBitmapUtil
:
Begin(const TPoint &)
Sets the current pixel position to the specified position and prepares the bitma...Begin(const TPoint &,const TBitmapUtil &)
Sets the current pixel position to the specified position and prepares the bitma...DecXPos()
Decrements the x co-ordinate of the current pixel position. DecYPos()
Decrements the y co-ordinate of the current pixel position. End()
Marks the end of the access to the bitmap data. This function must be called whe...GetPixel()const
Gets the value of the pixel at the current pixel position.IncXPos()
Increments the x co-ordinate of the current pixel position. IncYPos()
Increments the y co-ordinate of the current pixel position. SetPixel(TUint32)
Sets the value of the pixel at the current pixel position.SetPixel(const TBitmapUtil &)
Sets the value of the pixel at the current pixel position to that returned by aS...SetPos(const TPoint &)
Sets a new current pixel position.TBitmapUtil(CFbsBitmap *)
Constructs a TBitmapUtil object for the specified bitmap.IMPORT_C TBitmapUtil(CFbsBitmap *aBitmap);
Constructs a TBitmapUtil object for the specified bitmap.
|
IMPORT_C void Begin(const TPoint &aPosition);
Sets the current pixel position to the specified position and prepares the bitmap for access to its pixel data.
This function must be called before using any of the other functions provided by this class, otherwise damage to data may
occur. It must also be matched by a subsequent call to TBitmapUtil::End()
.
|
|
Interface status: | deprecated |
IMPORT_C void Begin(const TPoint &aPosition, const TBitmapUtil &aUtil);
Sets the current pixel position to the specified position and prepares the bitmap for access to its pixel data.
This function is deprecated. Use the other overload, TBitmapUtil::Begin(const TPoint &)
.
|
|
IMPORT_C void End();
Marks the end of the access to the bitmap data. This function must be called when finished using all the other functions provided by this class.
There must be exactly one call to TBitmapUtil::End()
for each previous call to TBitmapUtil::Begin(const TPoint &)
for a given TBitmapUtil object.
IMPORT_C TUint32 GetPixel() const;
Gets the value of the pixel at the current pixel position.
In normal usage, the value returned will immediately be used as the parameter to a call to TBitmapUtil::SetPixel(TUint32)
. To remove the overhead of constructing a TRgb
, the function uses a TUint32 rather than a TRgb
to hold an RGB value.
|
IMPORT_C void SetPixel(TUint32 aValue);
Sets the value of the pixel at the current pixel position.
To remove the overhead of constructing a TRgb
, the function uses a TUint32 rather than a TRgb
to hold an RGB value.
|
IMPORT_C void SetPixel(const TBitmapUtil &aSource);
Sets the value of the pixel at the current pixel position to that returned by aSource.GetPixel().
|
IMPORT_C void SetPos(const TPoint &aPosition);
Sets a new current pixel position.
|
IMPORT_C void IncYPos();
Increments the y co-ordinate of the current pixel position.