|
CartoType API
|
#include <cartotype_graphics.h>
Public Types | |
| enum | { EBitsPerPixelMask = 63, EColored = 64, ETwin = 128 } |
| enum | TType { E1BitMono = 1, E8BitMono = 8, E16BitColor = EColored | 16, E24BitColor = EColored | 24, E32BitColor = EColored | 32, E8BitTwin = ETwin | 8 } |
| typedef TColor(* | TColorFunction )(const TBitmap &aBitmap, uint32 aX, uint32 aY) |
Public Member Functions | |
| TBitmap (TType aType, uint8 *aData, int32 aWidth, int32 aHeight, int32 aRowBytes) | |
| CT_IMPORT TColorFunction | ColorFunction () const |
| CT_IMPORT CBitmap * | Copy (TResult &aError, int32 aExpansion=0) const |
| CT_IMPORT CBitmap * | Blur (TResult &aError, bool aGaussian, TFixed aWidth) const |
| TType | Type () const |
| int32 | BitsPerPixel () const |
| const uint8 * | Data () const |
| uint8 * | Data () |
| int32 | DataBytes () const |
| int32 | Width () const |
| int32 | Height () const |
| int32 | RowBytes () const |
| void | Clear () |
A bitmap that does not take ownership of pixel data.
| anonymous enum |
| EBitsPerPixelMask |
A mask for the bits in TBitmap::TType that represent the number of bits per pixel. |
| EColored |
The bit in TBitmap::TType that indicates whether the type is inherently colored, which means that its color data is held in the pixel value. |
| ETwin |
The bit in TBitmap::TType that indicates whether the type's data bits are split equally between intensity bits and palette bits. |
An enumerated type for supported bitmap types. The number of bits per pixel is held in the low 6 bits.
| CartoType::TBitmap::TBitmap | ( | TType | aType, |
| uint8 * | aData, | ||
| int32 | aWidth, | ||
| int32 | aHeight, | ||
| int32 | aRowBytes | ||
| ) | [inline] |
Create a bitmap with a specified type, data, and dimensions.
| int32 CartoType::TBitmap::BitsPerPixel | ( | ) | const [inline] |
Return the bitmap depth: that number of bits used to store each pixel.
Create a blurred bitmap with edges aWidth pixels wide. The new bitmap is wider and taller than the original bitmap by aWidth * 2 pixels.
| void CartoType::TBitmap::Clear | ( | ) | [inline] |
Clear the pixel data to zeroes.
| CT_EXPORT TBitmap::TColorFunction TBitmap::ColorFunction | ( | ) | const |
Return a pointer to a function to get the premultiplied-alpha color at a certain point, for this type of bitmap. Monochrome bitmaps return only an alpha level (the low 24 bits of the color value returned are all zeroes).
Color functions take the coordinates modulo the width and height of the bitmap.
Copy a bitmap, optionally expanding it by aExpansion pixels all round.
| const uint8* CartoType::TBitmap::Data | ( | ) | const [inline] |
Return a constant pointer to the start of the pixel data.
| uint8* CartoType::TBitmap::Data | ( | ) | [inline] |
Return a writable pointer to the start of the pixel data.
| int32 CartoType::TBitmap::DataBytes | ( | ) | const [inline] |
Return the number of bytes actually used to store the data. This may include padding at the ends of rows.
| int32 CartoType::TBitmap::Height | ( | ) | const [inline] |
Return the height in pixels.
| int32 CartoType::TBitmap::RowBytes | ( | ) | const [inline] |
Return the number of bytes used to store each horizontal row of pixels.
| TType CartoType::TBitmap::Type | ( | ) | const [inline] |
Return the bitmap type, which indicates its depth and whether it is colored.
| int32 CartoType::TBitmap::Width | ( | ) | const [inline] |
Return the width in pixels.
1.7.5.1