Public Types | |
enum | EBlitMode { kBitBltCopy = 0, kBitBltAnd = 1, kBitBltOr = 2, kBitBltColorize = 3, kBitBltXor = 4, kBitBltDitherCopy = 5, kBitBltNotSrcBic = 6, kInvalidBlitMode = 0xFFFFFFFF } |
enum | EJustification { kJustTopLeft = 0, kJustFullCenter = 1, kInvalidJustification = 0xFFFFFFFF } |
enum | EBlitType { eBlitNormal = 0, eBlitDithered = 1, eInvalidBlitType = 0xFFFFFFFF } |
enum | EBlitLocation { eUpperLeft = 0, eUpperCenter, eUpperRight, eLeftCenter, eCenter, eRightCenter, eBottomLeft, eBottomCenter, eBottomRight } |
Public Member Functions | |
TMCOffscreen (uint32 width, uint32 height, uint32 bitDepth, int32 left, int32 top, boolean rightSideUp=true, boolean allowGCDrawing=true) | |
TMCOffscreen (IMCGraphicContext &hDC, const TMCRect &rect, uint32 bitDepth, boolean rightSideUp=true, boolean allowGCDrawing=true) | |
Deprecated (not implemented). | |
TMCOffscreen (const TMCOffscreen &existingOffscreen) | |
virtual | ~TMCOffscreen (void) |
boolean | IsValid (void) const |
virtual TMCPixelBucket & | PixelBucket (void) |
virtual const TMCPixelBucket & | PixelBucket (void) const |
uint32 | GetWidth (void) const |
uint32 | GetHeight (void) const |
int32 | GetLeft (void) const |
int32 | GetTop (void) const |
uint8 * | GetBaseAddress (void) |
const uint8 * | GetBaseAddress (void) const |
uint32 | GetBitDepth (void) const |
uint32 | GetRowBytes (void) const |
uint32 | GetPadding (void) const |
uint32 | GetPlanes (void) const |
boolean | GetRightSideUp (void) const |
EBlitType | GetBlitType (void) const |
boolean | GetAllowGCDrawing (void) const |
virtual TMCRect | GetRect (void) const |
virtual boolean | GetRect (TMCRect &rect) const |
virtual SystemGCPtr | PrepareForGraphicContextDraw (void) |
virtual void | FinishedGraphicContextDraw (void) |
virtual void | SetOrigin (MCXYPos xPos, MCXYPos yPos) |
virtual void | FillMCInformation (void) |
DEPRECATED. | |
uint32 | CalcRowBytes (uint32 width, uint32 bitDepth) |
virtual boolean | SetBlitType (TMCOffscreen::EBlitType type) |
virtual void | GetPixel (int32 xLoc, int32 yLoc, TMCARGBColor &pixel) const |
virtual void | SetPixel (int32 xLoc, int32 yLoc, const TMCARGBColor &pixel) |
boolean | Blit (TMCOffscreen &destOffscreen) const |
boolean | Blit (TMCOffscreen &destOffscreen, const TMCRect &dstRect) const |
boolean | Blit (TMCOffscreen &destOffscreen, const TMCRect &dstRect, const TMCRect &srcRect) const |
boolean | Blit (IMCGraphicContext &destContext, const TMCRect &dstRect) const |
boolean | Blit (IMCGraphicContext &destContext, const TMCRect &dstRect, const TMCRect &srcRect) const |
virtual boolean | BlitAtPoint (TMCOffscreen &destOffscreen, const TMCPoint &dstPt, EBlitLocation blitLocation) const |
virtual boolean | GetBlitAtPointRect (const TMCPoint &dstPt, EBlitLocation blitLocation, TMCRect &rect) const |
virtual void | BlitMultRect (TMCGraphicContext *windowContext, TMCRect &bounds, TMCRectRegionIterator &iter, const TMCPoint &srcOffset) |
virtual void | BlitOffscreen (TMCGraphicContext *windowContext, TMCEventData *additionalData, const TMCPoint &offscreenOffset) |
Static Public Member Functions | |
static TMCOffscreen * | Create (uint32 width, uint32 height, uint32 bitDepth, int32 inLeft=0, int32 inTop=0, boolean rightSideUp=true, boolean allowGCDrawing=true) |
static TMCOffscreen * | Create (const TMCOffscreen &inOffscreen) |
static MCCOMErr | CreateCompatiblePixelBucket (int32 widthParam, int32 heightParam, int32 depthParam, TMCCompatiblePixelBucket **outBucket) |
static MCCOMErr | DestroyCompatiblePixelBucket (TMCCompatiblePixelBucket *inBucket) |
Protected Member Functions | |
virtual boolean | DefaultInitBegin (void) |
DEPRECATED. | |
virtual void | DefaultInitEnd (void) |
DEPRECATED. | |
virtual void | ClearAllPointers (void) |
DEPRECATED. | |
void | DefaultInitMCOffscreenBegin (void) |
void | DefaultInitMCOffscreenEnd (void) |
void | ClearAllMCOffscreenPointers (void) |
virtual boolean | Blit (SystemGCPtr destGC, const TMCRect &dstRect, const TMCRect &srcRect) const |
boolean | AdjustRectsForBlit (const TMCRect &totalsrc, const TMCRect &totaldst, TMCRect &srcRect, TMCRect &ioDstRect) const |
Protected Attributes | |
boolean | fValid |
EBlitType | fBlitType |
TMCPixelBucket | fPixelBucket |
int32 | fTop |
int32 | fLeft |
uint32 | fWidth |
uint32 | fHeight |
uint8 * | fBaseAddress |
uint32 | fBitDepth |
uint32 | fRowBytes |
uint32 | fPadding |
uint32 | fPlanes |
PixelBucketType | fBucketType |
boolean | fRightSideUp |
boolean | fAllowGCDrawing |
int32 | fPrepared |
SystemGCPtr | fGCDrawPtr |
TMCOffscreen is a platform specific block of pixels (bitmap) that can be sent quickly to the screen. The block is generally padded for alignment, so you must use GetBaseAddress() + rowIndex * GetRowBytes() to find the begining of a row.
The PixelBucket() method returns a TMCPixelBucket that references the memory of the offscreen, and that you can either manipulate directly, or pass to other functions.
TMCOffscreen owns its memory and will delete it. But since TMCOffscreen is not a counted object, you'll need to explicitely delete the offscreen. So it is a good idea to use a smart pointer: TMCSmartPtr<TMCOffscreen> offscreen;
TMCOffscreen::TMCOffscreen | ( | uint32 | width, | |
uint32 | height, | |||
uint32 | bitDepth, | |||
int32 | left, | |||
int32 | top, | |||
boolean | rightSideUp = true , |
|||
boolean | allowGCDrawing = true | |||
) |
TMCOffscreen::TMCOffscreen | ( | IMCGraphicContext & | hDC, | |
const TMCRect & | rect, | |||
uint32 | bitDepth, | |||
boolean | rightSideUp = true , |
|||
boolean | allowGCDrawing = true | |||
) |
Deprecated (not implemented).
TMCOffscreen::TMCOffscreen | ( | const TMCOffscreen & | existingOffscreen | ) |
virtual TMCOffscreen::~TMCOffscreen | ( | void | ) | [virtual] |
boolean TMCOffscreen::AdjustRectsForBlit | ( | const TMCRect & | totalsrc, | |
const TMCRect & | totaldst, | |||
TMCRect & | srcRect, | |||
TMCRect & | ioDstRect | |||
) | const [protected] |
boolean TMCOffscreen::Blit | ( | IMCGraphicContext & | destContext, | |
const TMCRect & | dstRect, | |||
const TMCRect & | srcRect | |||
) | const |
boolean TMCOffscreen::Blit | ( | IMCGraphicContext & | destContext, | |
const TMCRect & | dstRect | |||
) | const |
boolean TMCOffscreen::Blit | ( | TMCOffscreen & | destOffscreen, | |
const TMCRect & | dstRect, | |||
const TMCRect & | srcRect | |||
) | const |
boolean TMCOffscreen::Blit | ( | TMCOffscreen & | destOffscreen, | |
const TMCRect & | dstRect | |||
) | const |
boolean TMCOffscreen::Blit | ( | TMCOffscreen & | destOffscreen | ) | const |
virtual boolean TMCOffscreen::Blit | ( | SystemGCPtr | destGC, | |
const TMCRect & | dstRect, | |||
const TMCRect & | srcRect | |||
) | const [protected, virtual] |
virtual boolean TMCOffscreen::BlitAtPoint | ( | TMCOffscreen & | destOffscreen, | |
const TMCPoint & | dstPt, | |||
EBlitLocation | blitLocation | |||
) | const [virtual] |
virtual void TMCOffscreen::BlitMultRect | ( | TMCGraphicContext * | windowContext, | |
TMCRect & | bounds, | |||
TMCRectRegionIterator & | iter, | |||
const TMCPoint & | srcOffset | |||
) | [virtual] |
virtual void TMCOffscreen::BlitOffscreen | ( | TMCGraphicContext * | windowContext, | |
TMCEventData * | additionalData, | |||
const TMCPoint & | offscreenOffset | |||
) | [virtual] |
void TMCOffscreen::ClearAllMCOffscreenPointers | ( | void | ) | [protected] |
virtual void TMCOffscreen::ClearAllPointers | ( | void | ) | [protected, virtual] |
DEPRECATED.
static TMCOffscreen* TMCOffscreen::Create | ( | const TMCOffscreen & | inOffscreen | ) | [static] |
static TMCOffscreen* TMCOffscreen::Create | ( | uint32 | width, | |
uint32 | height, | |||
uint32 | bitDepth, | |||
int32 | inLeft = 0 , |
|||
int32 | inTop = 0 , |
|||
boolean | rightSideUp = true , |
|||
boolean | allowGCDrawing = true | |||
) | [static] |
static MCCOMErr TMCOffscreen::CreateCompatiblePixelBucket | ( | int32 | widthParam, | |
int32 | heightParam, | |||
int32 | depthParam, | |||
TMCCompatiblePixelBucket ** | outBucket | |||
) | [static] |
virtual boolean TMCOffscreen::DefaultInitBegin | ( | void | ) | [protected, virtual] |
DEPRECATED.
virtual void TMCOffscreen::DefaultInitEnd | ( | void | ) | [protected, virtual] |
DEPRECATED.
void TMCOffscreen::DefaultInitMCOffscreenBegin | ( | void | ) | [protected] |
void TMCOffscreen::DefaultInitMCOffscreenEnd | ( | void | ) | [protected] |
static MCCOMErr TMCOffscreen::DestroyCompatiblePixelBucket | ( | TMCCompatiblePixelBucket * | inBucket | ) | [static] |
virtual void TMCOffscreen::FillMCInformation | ( | void | ) | [virtual] |
DEPRECATED.
virtual void TMCOffscreen::FinishedGraphicContextDraw | ( | void | ) | [virtual] |
boolean TMCOffscreen::GetAllowGCDrawing | ( | void | ) | const [inline] |
const uint8* TMCOffscreen::GetBaseAddress | ( | void | ) | const [inline] |
uint8* TMCOffscreen::GetBaseAddress | ( | void | ) | [inline] |
uint32 TMCOffscreen::GetBitDepth | ( | void | ) | const [inline] |
virtual boolean TMCOffscreen::GetBlitAtPointRect | ( | const TMCPoint & | dstPt, | |
EBlitLocation | blitLocation, | |||
TMCRect & | rect | |||
) | const [virtual] |
EBlitType TMCOffscreen::GetBlitType | ( | void | ) | const [inline] |
uint32 TMCOffscreen::GetHeight | ( | void | ) | const [inline] |
int32 TMCOffscreen::GetLeft | ( | void | ) | const [inline] |
uint32 TMCOffscreen::GetPadding | ( | void | ) | const [inline] |
virtual void TMCOffscreen::GetPixel | ( | int32 | xLoc, | |
int32 | yLoc, | |||
TMCARGBColor & | pixel | |||
) | const [virtual] |
uint32 TMCOffscreen::GetPlanes | ( | void | ) | const [inline] |
virtual TMCRect TMCOffscreen::GetRect | ( | void | ) | const [virtual] |
boolean TMCOffscreen::GetRightSideUp | ( | void | ) | const [inline] |
uint32 TMCOffscreen::GetRowBytes | ( | void | ) | const [inline] |
int32 TMCOffscreen::GetTop | ( | void | ) | const [inline] |
uint32 TMCOffscreen::GetWidth | ( | void | ) | const [inline] |
boolean TMCOffscreen::IsValid | ( | void | ) | const [inline] |
virtual const TMCPixelBucket& TMCOffscreen::PixelBucket | ( | void | ) | const [inline, virtual] |
virtual TMCPixelBucket& TMCOffscreen::PixelBucket | ( | void | ) | [inline, virtual] |
virtual SystemGCPtr TMCOffscreen::PrepareForGraphicContextDraw | ( | void | ) | [virtual] |
virtual boolean TMCOffscreen::SetBlitType | ( | TMCOffscreen::EBlitType | type | ) | [virtual] |
virtual void TMCOffscreen::SetPixel | ( | int32 | xLoc, | |
int32 | yLoc, | |||
const TMCARGBColor & | pixel | |||
) | [virtual] |
boolean TMCOffscreen::fAllowGCDrawing [protected] |
uint8* TMCOffscreen::fBaseAddress [protected] |
uint32 TMCOffscreen::fBitDepth [protected] |
EBlitType TMCOffscreen::fBlitType [protected] |
PixelBucketType TMCOffscreen::fBucketType [protected] |
SystemGCPtr TMCOffscreen::fGCDrawPtr [protected] |
uint32 TMCOffscreen::fHeight [protected] |
int32 TMCOffscreen::fLeft [protected] |
uint32 TMCOffscreen::fPadding [protected] |
TMCPixelBucket TMCOffscreen::fPixelBucket [protected] |
uint32 TMCOffscreen::fPlanes [protected] |
int32 TMCOffscreen::fPrepared [protected] |
boolean TMCOffscreen::fRightSideUp [protected] |
uint32 TMCOffscreen::fRowBytes [protected] |
int32 TMCOffscreen::fTop [protected] |
boolean TMCOffscreen::fValid [protected] |
uint32 TMCOffscreen::fWidth [protected] |