TMCOffscreen Class Reference
[MCCore]

List of all members.

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

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


Detailed Description

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;


Member Enumeration Documentation

enum TMCOffscreen::EBlitMode

Enumerator:
kBitBltCopy 
kBitBltAnd 
kBitBltOr 
kBitBltColorize 
kBitBltXor 
kBitBltDitherCopy 
kBitBltNotSrcBic 
kInvalidBlitMode 

enum TMCOffscreen::EJustification

Enumerator:
kJustTopLeft 
kJustFullCenter 
kInvalidJustification 

enum TMCOffscreen::EBlitType

Enumerator:
eBlitNormal 
eBlitDithered 
eInvalidBlitType 

enum TMCOffscreen::EBlitLocation

Enumerator:
eUpperLeft 
eUpperCenter 
eUpperRight 
eLeftCenter 
eCenter 
eRightCenter 
eBottomLeft 
eBottomCenter 
eBottomRight 


Constructor & Destructor Documentation

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]


Member Function Documentation

static TMCOffscreen* TMCOffscreen::Create ( uint32  width,
uint32  height,
uint32  bitDepth,
int32  inLeft = 0,
int32  inTop = 0,
boolean  rightSideUp = true,
boolean  allowGCDrawing = true 
) [static]

static TMCOffscreen* TMCOffscreen::Create ( const TMCOffscreen &  inOffscreen  )  [static]

static MCCOMErr TMCOffscreen::CreateCompatiblePixelBucket ( int32  widthParam,
int32  heightParam,
int32  depthParam,
TMCCompatiblePixelBucket **  outBucket 
) [static]

static MCCOMErr TMCOffscreen::DestroyCompatiblePixelBucket ( TMCCompatiblePixelBucket *  inBucket  )  [static]

virtual boolean TMCOffscreen::DefaultInitBegin ( void   )  [protected, virtual]

DEPRECATED.

virtual void TMCOffscreen::DefaultInitEnd ( void   )  [protected, virtual]

DEPRECATED.

virtual void TMCOffscreen::ClearAllPointers ( void   )  [protected, virtual]

DEPRECATED.

void TMCOffscreen::DefaultInitMCOffscreenBegin ( void   )  [protected]

void TMCOffscreen::DefaultInitMCOffscreenEnd ( void   )  [protected]

void TMCOffscreen::ClearAllMCOffscreenPointers ( void   )  [protected]

virtual boolean TMCOffscreen::Blit ( SystemGCPtr  destGC,
const TMCRect &  dstRect,
const TMCRect &  srcRect 
) const [protected, virtual]

boolean TMCOffscreen::AdjustRectsForBlit ( const TMCRect &  totalsrc,
const TMCRect &  totaldst,
TMCRect &  srcRect,
TMCRect &  ioDstRect 
) const [protected]

boolean TMCOffscreen::IsValid ( void   )  const [inline]

virtual TMCPixelBucket& TMCOffscreen::PixelBucket ( void   )  [inline, virtual]

virtual const TMCPixelBucket& TMCOffscreen::PixelBucket ( void   )  const [inline, virtual]

uint32 TMCOffscreen::GetWidth ( void   )  const [inline]

uint32 TMCOffscreen::GetHeight ( void   )  const [inline]

int32 TMCOffscreen::GetLeft ( void   )  const [inline]

int32 TMCOffscreen::GetTop ( void   )  const [inline]

uint8* TMCOffscreen::GetBaseAddress ( void   )  [inline]

const uint8* TMCOffscreen::GetBaseAddress ( void   )  const [inline]

uint32 TMCOffscreen::GetBitDepth ( void   )  const [inline]

uint32 TMCOffscreen::GetRowBytes ( void   )  const [inline]

uint32 TMCOffscreen::GetPadding ( void   )  const [inline]

uint32 TMCOffscreen::GetPlanes ( void   )  const [inline]

boolean TMCOffscreen::GetRightSideUp ( void   )  const [inline]

EBlitType TMCOffscreen::GetBlitType ( void   )  const [inline]

boolean TMCOffscreen::GetAllowGCDrawing ( void   )  const [inline]

virtual TMCRect TMCOffscreen::GetRect ( void   )  const [virtual]

virtual boolean TMCOffscreen::GetRect ( TMCRect &  rect  )  const [virtual]

virtual SystemGCPtr TMCOffscreen::PrepareForGraphicContextDraw ( void   )  [virtual]

virtual void TMCOffscreen::FinishedGraphicContextDraw ( void   )  [virtual]

virtual void TMCOffscreen::SetOrigin ( MCXYPos  xPos,
MCXYPos  yPos 
) [virtual]

virtual void TMCOffscreen::FillMCInformation ( void   )  [virtual]

DEPRECATED.

uint32 TMCOffscreen::CalcRowBytes ( uint32  width,
uint32  bitDepth 
) [inline]

virtual boolean TMCOffscreen::SetBlitType ( TMCOffscreen::EBlitType  type  )  [virtual]

virtual void TMCOffscreen::GetPixel ( int32  xLoc,
int32  yLoc,
TMCARGBColor &  pixel 
) const [virtual]

virtual void TMCOffscreen::SetPixel ( int32  xLoc,
int32  yLoc,
const TMCARGBColor &  pixel 
) [virtual]

boolean TMCOffscreen::Blit ( TMCOffscreen &  destOffscreen  )  const

boolean TMCOffscreen::Blit ( TMCOffscreen &  destOffscreen,
const TMCRect &  dstRect 
) const

boolean TMCOffscreen::Blit ( TMCOffscreen &  destOffscreen,
const TMCRect &  dstRect,
const TMCRect &  srcRect 
) const

boolean TMCOffscreen::Blit ( IMCGraphicContext &  destContext,
const TMCRect &  dstRect 
) const

boolean TMCOffscreen::Blit ( IMCGraphicContext &  destContext,
const TMCRect &  dstRect,
const TMCRect &  srcRect 
) const

virtual boolean TMCOffscreen::BlitAtPoint ( TMCOffscreen &  destOffscreen,
const TMCPoint &  dstPt,
EBlitLocation  blitLocation 
) const [virtual]

virtual boolean TMCOffscreen::GetBlitAtPointRect ( const TMCPoint &  dstPt,
EBlitLocation  blitLocation,
TMCRect &  rect 
) const [virtual]


Member Data Documentation

boolean TMCOffscreen::fValid [protected]

EBlitType TMCOffscreen::fBlitType [protected]

TMCPixelBucket TMCOffscreen::fPixelBucket [protected]

int32 TMCOffscreen::fTop [protected]

int32 TMCOffscreen::fLeft [protected]

uint32 TMCOffscreen::fWidth [protected]

uint32 TMCOffscreen::fHeight [protected]

uint8* TMCOffscreen::fBaseAddress [protected]

uint32 TMCOffscreen::fBitDepth [protected]

uint32 TMCOffscreen::fRowBytes [protected]

uint32 TMCOffscreen::fPadding [protected]

uint32 TMCOffscreen::fPlanes [protected]

PixelBucketType TMCOffscreen::fBucketType [protected]

boolean TMCOffscreen::fRightSideUp [protected]

boolean TMCOffscreen::fAllowGCDrawing [protected]

int32 TMCOffscreen::fPrepared [protected]

SystemGCPtr TMCOffscreen::fGCDrawPtr [protected]


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 15:19:31 2007 for Carrara SDK Doc by  doxygen 1.5.3