|
static int | getScaleFactor (int srcSize, int dstSize) |
|
static PixelFormat | getSupportedPixelFormat () |
|
static void | blit (byte *dst, const byte *src, const uint dstPitch, const uint srcPitch, const int posX, const int posY, const uint width, const uint height, const int scaleX, const int scaleY, const int scaleXsrcOff, const int scaleYsrcOff, const uint32 colorMod, const uint flipping, const TSpriteBlendMode blendMode, const AlphaType alphaType) |
|
|
static const int | SCALE_THRESHOLD = 0x100 |
|
static const int | kBModShift = 8 |
|
static const int | kGModShift = 16 |
|
static const int | kRModShift = 24 |
|
static const int | kAModShift = 0 |
|
static const uint32 | kBModMask = 0x0000ff00 |
|
static const uint32 | kGModMask = 0x00ff0000 |
|
static const uint32 | kRModMask = 0xff000000 |
|
static const uint32 | kAModMask = 0x000000ff |
|
static const uint32 | kRGBModMask = (kRModMask | kGModMask | kBModMask) |
|
static const int | kAIndex = 0 |
|
static const int | kBIndex = 1 |
|
static const int | kGIndex = 2 |
|
static const int | kRIndex = 3 |
|
◆ getSupportedPixelFormat()
static PixelFormat Graphics::BlendBlit::getSupportedPixelFormat |
( |
| ) |
|
|
inlinestatic |
Returns the pixel format all operations of BlendBlit::blit support.
Use MS_ARGB and MS_RGB to quickly make a color in this format. MS_ARGB/RGB are found in graphics/transform_struct.h
- Returns
- Supported pixel format.
◆ blit()
static void Graphics::BlendBlit::blit |
( |
byte * |
dst, |
|
|
const byte * |
src, |
|
|
const uint |
dstPitch, |
|
|
const uint |
srcPitch, |
|
|
const int |
posX, |
|
|
const int |
posY, |
|
|
const uint |
width, |
|
|
const uint |
height, |
|
|
const int |
scaleX, |
|
|
const int |
scaleY, |
|
|
const int |
scaleXsrcOff, |
|
|
const int |
scaleYsrcOff, |
|
|
const uint32 |
colorMod, |
|
|
const uint |
flipping, |
|
|
const TSpriteBlendMode |
blendMode, |
|
|
const AlphaType |
alphaType |
|
) |
| |
|
static |
Optimized version of doBlit to be used with alpha blended blitting NOTE: Can only be used with BlendBlit::getSupportedPixelFormat format
- Parameters
-
dst | a pointer to the destination buffer (can be offseted by pixels) |
src | a pointer to the source buffer (can be offseted by pixels) |
dstPitch | destination pitch |
srcPitch | source pitch |
posX | where src will be blitted to (onto dest) |
posY | where src will be blitted to (onto dest) |
width | width of the input surface |
height | height of the input surface |
scaleX | scale factor to use when blitting (src / dst) (0.5 for 2x scale) use BlendBlit::SCALE_THRESHOLD |
scaleY | scale factor to use when blitting (src / dst) (0.5 for 2x scale) use BlendBlit::SCALE_THRESHOLD |
scaleXsrcOff | since you can only offset the *src pointer to effectivly get a different part of the source image rendered, it can only go in 1 pixel chunks, so this fixes that by added a little offset |
scaleYsrcOff | same as the X one |
colorMod | the color to multiply by. (0xffffffff does no multiplication and has 0 overhead usually) |
flipping | flipping flags used with Graphics::FLIP_FLAGS |
blendMode | the blending mode to be used |
alphaType | the alpha mixing mode to be used |
The documentation for this class was generated from the following files: