SkMask Class Reference
#include <SkMask.h>
List of all members.
Detailed Description
SkMask is used to describe alpha bitmaps, either 1bit, 8bit, or the 3-channel 3D format. These are passed to SkMaskFilter objects.
Definition at line 26 of file SkMask.h.
Member Enumeration Documentation
- Enumerator:
-
Definition at line 51 of file SkMask.h.
- Enumerator:
kJustComputeBounds_CreateMode |
compute bounds and return
|
kJustRenderImage_CreateMode |
render into preallocate mask
|
kComputeBoundsAndRenderImage_CreateMode |
compute bounds, alloc image and render into it
|
Definition at line 123 of file SkMask.h.
- Enumerator:
kBW_Format |
1bit per pixel mask (e.g. monochrome)
|
kA8_Format |
8bits per pixel mask (e.g. antialiasing)
|
k3D_Format |
3 8bit per pixl planes: alpha, mul, add
|
kHorizontalLCD_Format |
4 bytes/pixel: a/r/g/b
|
kVerticalLCD_Format |
4 bytes/pixel: a/r/g/b
|
Definition at line 27 of file SkMask.h.
Member Function Documentation
static uint8_t* SkMask::AllocImage |
( |
size_t |
bytes |
) |
[static] |
size_t SkMask::computeImageSize |
( |
|
) |
const |
Return the byte size of the mask, assuming only 1 plane. Does not account for k3D_Format. For that, use computeTotalImageSize(). If there is an overflow of 32bits, then returns 0.
size_t SkMask::computeTotalImageSize |
( |
|
) |
const |
Return the byte size of the mask, taking into account any extra planes (e.g. k3D_Format). If there is an overflow of 32bits, then returns 0.
static bool SkMask::FormatIsLCD |
( |
Format |
fm |
) |
[inline, static] |
static void SkMask::FreeImage |
( |
void * |
image |
) |
[static] |
uint8_t* SkMask::getAddr |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | const [inline] |
Returns the address of the specified byte. Asserts that the mask is kA8_Format, and that x,y are in range. x,y are in the same coordiate space as fBounds.
Definition at line 91 of file SkMask.h.
uint8_t* SkMask::getAddr1 |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | const [inline] |
Returns the address of the byte that holds the specified bit. Asserts that the mask is kBW_Format, and that x,y are in range. x,y are in the same coordiate space as fBounds.
Definition at line 80 of file SkMask.h.
const uint32_t* SkMask::getAddrLCD |
( |
int |
x, |
|
|
int |
y | |
|
) |
| | const [inline] |
Return an address into the 32-bit plane of an LCD or VerticalLCD mask for the given position.
Definition at line 101 of file SkMask.h.
bool SkMask::isEmpty |
( |
|
) |
const [inline] |
Returns true if the mask is empty: i.e. it has an empty bounds.
Definition at line 62 of file SkMask.h.
unsigned SkMask::rowWordsLCD |
( |
|
) |
const [inline] |
Return the number of 32-bit words in a row of the 32-bit plane of an LCD or VerticalLCD mask.
Definition at line 112 of file SkMask.h.
Member Data Documentation
The documentation for this class was generated from the following file: