Frontend::Bitmap Class Reference
#include <Bitmap.h>
Inheritance diagram for Frontend::Bitmap:
List of all members.
|
Public Types |
| enum | Components { ComponentsRGBA,
Components111R
} |
| enum | RotateAngle { RotateAngle90CW,
RotateAngle90CCW,
RotateAngle180
} |
Public Member Functions |
| | Bitmap (int width, int height, PixelFormat pixelFormat) |
| | Bitmap (int width, int height, PixelFormat pixelFormat, void *pixels, bool ownsPixels) |
| | Constructs a new Bitmap.
|
| | ~Bitmap () |
| int | GetWidth () |
| | Returns the width of the Bitmap.
|
| int | GetHeight () |
| | Returns the height of the Bitmap.
|
| int | GetPitch () |
| | Returns the pitch of the Bitmap (in bytes).
|
| int | GetBytesPerPixel () |
| | Returns the size of a pixel (in bytes).
|
| Math::Vector2i | GetDimensions () |
| | Returns the dimensions of the Bitmap.
|
| Math::Recti | GetRect () |
| | Returns the rectangle of the Bitmap.
|
| PixelFormat | GetPixelFormat () |
| | Returns the PixelFormat of the Bitmap.
|
| void * | GetPixels () |
| | Returns a pointer to the Bitmap Data.
|
| void * | GetScanline (int y) |
| | Returns a pointer to a Scanline.
|
| void * | GetPixel (int x, int y) |
| | Returns a pointer to a pixel.
|
| void | Clear (UInt32 color) |
| | Sets every pixel to specified color.
|
| void | PremultiplyAlpha () |
| | Multiplies the color of every pixel with the alpha of that pixel.
|
| void | Rotate (RotateAngle angle) |
| Bitmap * | Rotated (RotateAngle angle) |
| void | FlipVertical () |
| Bitmap * | FlippedVertical () |
| Bitmap * | DownSampled () |
| | Returns a new Bitmap with half width and height.
|
| void | DownSample () |
| void | Blit (Bitmap *source, Math::Recti sourceRect, Math::Vector2i targetPosition) |
| void | Blit (Bitmap *source, Math::Recti sourceRect, Math::Vector2i targetPosition, Components components, bool premultiplyAlpha) |
| void | AddRef () |
| | Adds a reference to the object.
|
| void | Release () |
| | Releases a reference on the object.
|
| unsigned int | GetRefCount () |
| | Returns the number of references on the object.
|
Static Public Member Functions |
| static int | GetBytesPerPixelOfType (PixelFormat pixelFormat) |
Private Attributes |
| int | width |
| int | height |
| PixelFormat | pixelFormat |
| void * | pixels |
| bool | ownsPixels |
Member Enumeration Documentation
|
|
- Enumerator:
-
| ComponentsRGBA |
|
| Components111R |
|
|
|
|
- Enumerator:
-
| RotateAngle90CW |
|
| RotateAngle90CCW |
|
| RotateAngle180 |
|
|
Constructor & Destructor Documentation
| Frontend::Bitmap::Bitmap |
( |
int |
width, |
|
|
int |
height, |
|
|
PixelFormat |
pixelFormat |
|
) |
|
|
| Frontend::Bitmap::Bitmap |
( |
int |
width, |
|
|
int |
height, |
|
|
PixelFormat |
pixelFormat, |
|
|
void * |
pixels, |
|
|
bool |
ownsPixels |
|
) |
|
|
|
|
Constructs a new Bitmap.
- Parameters:
-
| width | The width, in pixels, of the Bitmap |
| height | The height, in pixels, of the Bitmap |
| pixels | A pointer to the pixel data |
| ownsPixels | If true, the Bitmap will delete the pixel data on destruction. |
|
| Frontend::Bitmap::~Bitmap |
( |
|
) |
|
|
Member Function Documentation
| void Frontend::Object::AddRef |
( |
|
) |
[inherited] |
|
|
|
Adds a reference to the object.
Aqcuires an additional ownership on the object. The object will not be deleted until all owners have called Release() on it. - See also:
- Release()
|
| void Frontend::Bitmap::Clear |
( |
UInt32 |
color |
) |
|
|
|
|
Sets every pixel to specified color.
|
| void Frontend::Bitmap::DownSample |
( |
|
) |
|
|
| Bitmap* Frontend::Bitmap::DownSampled |
( |
|
) |
|
|
|
|
Returns a new Bitmap with half width and height.
|
| Bitmap* Frontend::Bitmap::FlippedVertical |
( |
|
) |
|
|
| void Frontend::Bitmap::FlipVertical |
( |
|
) |
|
|
| int Frontend::Bitmap::GetBytesPerPixel |
( |
|
) |
|
|
|
|
Returns the size of a pixel (in bytes).
|
| static int Frontend::Bitmap::GetBytesPerPixelOfType |
( |
PixelFormat |
pixelFormat |
) |
[static] |
|
|
|
Returns the dimensions of the Bitmap.
|
| int Frontend::Bitmap::GetHeight |
( |
|
) |
|
|
|
|
Returns the height of the Bitmap.
|
| int Frontend::Bitmap::GetPitch |
( |
|
) |
|
|
|
|
Returns the pitch of the Bitmap (in bytes).
|
| void* Frontend::Bitmap::GetPixel |
( |
int |
x, |
|
|
int |
y |
|
) |
|
|
|
|
Returns a pointer to a pixel.
|
|
|
Returns the PixelFormat of the Bitmap.
|
| void* Frontend::Bitmap::GetPixels |
( |
|
) |
|
|
|
|
Returns a pointer to the Bitmap Data.
|
|
|
Returns the rectangle of the Bitmap.
|
| unsigned int Frontend::Object::GetRefCount |
( |
|
) |
[inline, inherited] |
|
|
|
Returns the number of references on the object.
- Returns:
- The number of references on the object.
|
| void* Frontend::Bitmap::GetScanline |
( |
int |
y |
) |
|
|
|
|
Returns a pointer to a Scanline.
|
| int Frontend::Bitmap::GetWidth |
( |
|
) |
|
|
|
|
Returns the width of the Bitmap.
|
| void Frontend::Bitmap::PremultiplyAlpha |
( |
|
) |
|
|
|
|
Multiplies the color of every pixel with the alpha of that pixel.
Throws an exception if the pixel format is unsupported for this operation. |
| void Frontend::Object::Release |
( |
|
) |
[inherited] |
|
|
|
Releases a reference on the object.
If you are an owner of an object, use this function to release it when you are done with it. The object will not be deleted until all owners have called Release() on it. |
Member Data Documentation
The documentation for this class was generated from the following file: