# IMCGraphicContext Struct Reference
[MCCore]

Inheritance diagram for IMCGraphicContext:

List of all members.

## Public Member Functions
virtual void MCCOMAPI | SetOrigin (const TMCPoint &inOrigin)=0
virtual void MCCOMAPI | GetOrigin (TMCPoint &outPoint) const =0
virtual void MCCOMAPI | ClearClip (void)=0
virtual void MCCOMAPI | IntersectWithCurrentClip (const TMCRect &inRect)=0
virtual void MCCOMAPI | RemoveFromCurrentClip (const TMCRect &inRect)=0
virtual void MCCOMAPI | GetClipRect (TMCRect &clipRect) const =0
virtual void MCCOMAPI | SetClipRegion (TMCRectRegion *clipRgn)=0
virtual TMCRectRegion *MCCOMAPI | GetClipRegion (boolean clone=false) const =0
virtual void MCCOMAPI | ScrollRect (const TMCRect &arect, MCXYPos dX, MCXYPos dY, TMCRect &outHorizontalInval, TMCRect &outVerticalInval)=0
virtual boolean MCCOMAPI | GetPixelColor (TMCRGBColor &outColor, MCXYPos xPos, MCXYPos yPos) const =0
virtual void MCCOMAPI | SetPixel (MCXYPos xPos, MCXYPos yPos, const TMCRGBColor &acolor)=0
virtual void MCCOMAPI | SetPen (MCPenMode aPenMode, MCPenType aPenType, MCPenSize size, const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | GetPen (MCPenMode &outPenMode, MCPenType &outPenType, MCPenSize &outSize, TMCRGBColor &outColor)=0
virtual void MCCOMAPI | ResetPen (void)=0
virtual void MCCOMAPI | GetFillColor (TMCRGBColor &inColor)=0
virtual void MCCOMAPI | GetEraseColor (TMCRGBColor &inColor)=0
virtual void MCCOMAPI | GetPenColor (TMCRGBColor &inColor)=0
virtual void MCCOMAPI | SetFillColor (const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | SetEraseColor (const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | SetPenColor (const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | DrawLine (MCXYPos x1, MCXYPos y1, MCXYPos x2, MCXYPos y2)=0
virtual void MCCOMAPI | Move (const MCXYPos xDelta, const MCXYPos yDelta)=0
virtual void MCCOMAPI | MoveTo (int32 xPos, int32 yPos)=0
virtual void MCCOMAPI | Line (const MCXYPos xDelta, const MCXYPos yDelta)=0
virtual void MCCOMAPI | LineTo (int32 xPos, int32 yPos)=0
virtual void MCCOMAPI | EraseRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | InvertRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | InvertHiliteRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | FrameRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | FillRect (const TMCRect &theRect, const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | PaintRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | DimRect (const TMCRect &theRect)=0
virtual void MCCOMAPI | FrameRoundRect (const TMCRect &theRect, int16 radius)=0
virtual void MCCOMAPI | FillRoundRect (const TMCRect &theRect, const TMCRGBColor &inColor, int16 radius)=0
virtual void MCCOMAPI | PaintRoundRect (const TMCRect &theRect, int16 radius)=0
virtual void MCCOMAPI | FrameOval (const TMCRect &theRect)=0
virtual void MCCOMAPI | FillOval (const TMCRect &theRect, const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | PaintOval (const TMCRect &theRect)=0
virtual void MCCOMAPI | FrameOvalArc (const TMCRect &theRect, real32 begin, real32 delta)=0
virtual void MCCOMAPI | PaintOvalArc (const TMCRect &theRect, real32 begin, real32 delta)=0
virtual void MCCOMAPI | FillOvalArc (const TMCRect &theRect, real32 begin, real32 delta, const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | FramePoly (const TMCPolygon &apoly)=0
virtual void MCCOMAPI | FillPoly (const TMCPolygon &apoly, const TMCRGBColor &inColor)=0
virtual void MCCOMAPI | PaintPoly (const TMCPolygon &apoly)=0
virtual void MCCOMAPI | DrawString (const TMCRect &theRect, const TMCString &astring, MCTextJustification just, MCTextMode mode)=0
virtual void MCCOMAPI | FitStringInWidth (TMCString &string, int16 maxWidth, MCTextJustification method) const =0
virtual void MCCOMAPI | FitStringInWidth (TMCString &string, int16 maxWidth, MCTextJustification method, const TMCTextStyle &inStyle) const =0
virtual uint32 MCCOMAPI | StringWidth (const TMCString &astring) const =0
virtual uint32 MCCOMAPI | StringWidth (const TMCString &astring, const TMCTextStyle &inStyle) const =0
virtual real32 MCCOMAPI | StringWidthReal (const TMCString &astring) const =0
virtual real32 MCCOMAPI | StringWidthReal (const TMCString &astring, const TMCTextStyle &inStyle) const =0
virtual uint32 MCCOMAPI | PixelWidthToStringIndex (const int32 inPixelWidth, const TMCString &inString, const TMCTextStyle &inStyle) const =0
virtual uint32 MCCOMAPI | PixelWidthToStringIndex (const int32 inPixelWidth, const TMCString &inString) const =0
virtual void MCCOMAPI | SetTextStyle (const TMCTextStyle &newStyle)=0
virtual void MCCOMAPI | SetTextColor (const TMCRGBColor &color)=0
virtual void MCCOMAPI | GetTextStyle (TMCTextStyle &newStyle)=0
virtual void MCCOMAPI | GetTextColor (TMCRGBColor &color) const =0
virtual void MCCOMAPI | GetMCTextMetrics (TMCTextMetrics &outMetrics) const =0
virtual void MCCOMAPI | GetMCTextMetrics (const TMCTextStyle &inStyle, TMCTextMetrics &outMetrics) const =0
virtual void MCCOMAPI | Blit (IMCGraphicContext *aGD, const TMCRect &srcRect, const TMCRect &dstRect, TMCPixelFX *pixelFX=NULL, boolean inDither=false, boolean inRespectAlpha=false)=0
virtual void MCCOMAPI | Blit (TMCOffscreen &aGD, const TMCRect &srcRect, const TMCRect &dstRect)=0
virtual void MCCOMAPI | BlitOffscreen (TMCOffscreen &src, const TMCRect &srcRect, const TMCRect &dstRect, const TMCRect &clipRect, TMCPixelFX *pixelFX=NULL, boolean inDither=false, boolean inRespectAlpha=false)=0
virtual void MCCOMAPI | BlitBucket (TMCPixelBucket &src, const TMCRect &srcRect, const TMCRect &dstRect, const TMCRect &clipRect, TMCPixelFX *pixelFX=NULL, boolean inDither=false, boolean inRespectAlpha=false)=0
virtual void MCCOMAPI | BlitCompressedBits (TMCRLEPixels &src, const TMCRect &srcRect, const TMCRect &dstRect, const TMCRGBColor &inGrayscaleColor, TMCPixelFX &pixelFX, const TMCRect &clipRect)=0
virtual void MCCOMAPI | DoPixelFX (TMCPixelFX &pixelFX, const TMCRect &clipTo, const TMCRect &imageRect, boolean(TMCPixelFX::*function)(DoPixelFXData *), DoPixelFXData *data)=0
virtual void MCCOMAPI | GetClosestColor (const TMCRGBColor &acolor, TMCRGBColor &closest)=0
virtual void MCCOMAPI | SetTransparency (real32 inTransparency)=0
virtual real32 MCCOMAPI | GetTransparency () const =0
virtual void MCCOMAPI | FillRectWithTransparency (const TMCRect &theRect, const TMCRGBColor &inColor, real32 inTransparency)=0
virtual SystemGCPtr MCCOMAPI | GetSystemGCPtr (void) const =0
virtual void MCCOMAPI | GetBucket (TMCPixelBucket *&)=0
virtual MCCOMErr MCCOMAPI | GetNewGraphicContext (uint32 width, uint32 height, IMCGraphicContext **outContext)=0
virtual void MCCOMAPI | FlushOnScreen (const TMCRect *flushZone)=0
virtual void MCCOMAPI | RestoreClipRegion (TMCRectRegion *clipRgn)=0
| Same than SetClipRegion, but the context will own the region (and delete it).
virtual boolean MCCOMAPI | DebugValidateOpaque () const =0

## Detailed Description

IMCGraphicContext is the interface to access graphic contexts. Graphic contexts allow you to draw in the backbuffer and one the screen. A typical place where you can use a graphic context is in IMFPart::SelfDraw().

## Member Function Documentation

virtual void MCCOMAPI IMCGraphicContext::Blit | ( | TMCOffscreen & | aGD,
|  | const TMCRect & | srcRect,
|  | const TMCRect & | dstRect |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::Blit | ( | IMCGraphicContext * | aGD,
|  | const TMCRect & | srcRect,
|  | const TMCRect & | dstRect,
|  | TMCPixelFX * | pixelFX = `NULL`,
|  | boolean | inDither = `false`,
|  | boolean | inRespectAlpha = `false` |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::BlitBucket | ( | TMCPixelBucket & | src,
|  | const TMCRect & | srcRect,
|  | const TMCRect & | dstRect,
|  | const TMCRect & | clipRect,
|  | TMCPixelFX * | pixelFX = `NULL`,
|  | boolean | inDither = `false`,
|  | boolean | inRespectAlpha = `false` |
| ) |  |  | `[pure virtual]`

Blits the content of a pixel bucket. Not that you need to pass a pixelFX if you expect the clipping to work properly.

Parameters:

  | src | Pixel bucket that contains the image to blit.
  | srcRect | The sub rectangle of the pixel bucket that needs to be blitted (to blit the full pixel bucket use TMCPixelBucket::Rect() )
  | dstRect | The destination rect in the context coordinates
  | clipRect | A rectangle used to clip the destination (does not work when there no pixelFX!)
  | pixelFX | A pixel effect used to blit
  | inDither | Apply dithering
  | inRespectAlpha | Respect alpha channel if any (not that it will only work if you pass a pixelFX)

virtual void MCCOMAPI IMCGraphicContext::BlitCompressedBits | ( | TMCRLEPixels & | src,
|  | const TMCRect & | srcRect,
|  | const TMCRect & | dstRect,
|  | const TMCRGBColor & | inGrayscaleColor,
|  | TMCPixelFX & | pixelFX,
|  | const TMCRect & | clipRect |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::BlitOffscreen | ( | TMCOffscreen & | src,
|  | const TMCRect & | srcRect,
|  | const TMCRect & | dstRect,
|  | const TMCRect & | clipRect,
|  | TMCPixelFX * | pixelFX = `NULL`,
|  | boolean | inDither = `false`,
|  | boolean | inRespectAlpha = `false` |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::ClearClip | ( | void |  | ) | `[pure virtual]`

virtual boolean MCCOMAPI IMCGraphicContext::DebugValidateOpaque | ( |  | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::DimRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::DoPixelFX | ( | TMCPixelFX & | pixelFX,
|  | const TMCRect & | clipTo,
|  | const TMCRect & | imageRect,
|  | boolean(TMCPixelFX::*)(DoPixelFXData *) | function,
|  | DoPixelFXData * | data |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::DrawLine | ( | MCXYPos | x1,
|  | MCXYPos | y1,
|  | MCXYPos | x2,
|  | MCXYPos | y2 |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::DrawString | ( | const TMCRect & | theRect,
|  | const TMCString & | astring,
|  | MCTextJustification | just,
|  | MCTextMode | mode |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::EraseRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillOval | ( | const TMCRect & | theRect,
|  | const TMCRGBColor & | inColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillOvalArc | ( | const TMCRect & | theRect,
|  | real32 | begin,
|  | real32 | delta,
|  | const TMCRGBColor & | inColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillPoly | ( | const TMCPolygon & | apoly,
|  | const TMCRGBColor & | inColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillRect | ( | const TMCRect & | theRect,
|  | const TMCRGBColor & | inColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillRectWithTransparency | ( | const TMCRect & | theRect,
|  | const TMCRGBColor & | inColor,
|  | real32 | inTransparency |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FillRoundRect | ( | const TMCRect & | theRect,
|  | const TMCRGBColor & | inColor,
|  | int16 | radius |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FitStringInWidth | ( | TMCString & | string,
|  | int16 | maxWidth,
|  | MCTextJustification | method,
|  | const TMCTextStyle & | inStyle |
| ) |  |  | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FitStringInWidth | ( | TMCString & | string,
|  | int16 | maxWidth,
|  | MCTextJustification | method |
| ) |  |  | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FlushOnScreen | ( | const TMCRect * | flushZone | ) | `[pure virtual]`

Call Only implemented on MacOsX (for now) Sends the given flushZone on screen (or the whole context if the pointer is null

Parameters:

  | flushZone |

virtual void MCCOMAPI IMCGraphicContext::FrameOval | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FrameOvalArc | ( | const TMCRect & | theRect,
|  | real32 | begin,
|  | real32 | delta |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FramePoly | ( | const TMCPolygon & | apoly | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FrameRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::FrameRoundRect | ( | const TMCRect & | theRect,
|  | int16 | radius |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetBucket | ( | TMCPixelBucket *& |  | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetClipRect | ( | TMCRect & | clipRect | ) | const`[pure virtual]`

virtual TMCRectRegion* MCCOMAPI IMCGraphicContext::GetClipRegion | ( | boolean | clone = `false` | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetClosestColor | ( | const TMCRGBColor & | acolor,
|  | TMCRGBColor & | closest |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetEraseColor | ( | TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetFillColor | ( | TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetMCTextMetrics | ( | const TMCTextStyle & | inStyle,
|  | TMCTextMetrics & | outMetrics |
| ) |  |  | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetMCTextMetrics | ( | TMCTextMetrics & | outMetrics | ) | const`[pure virtual]`

virtual MCCOMErr MCCOMAPI IMCGraphicContext::GetNewGraphicContext | ( | uint32 | width,
|  | uint32 | height,
|  | IMCGraphicContext ** | outContext |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetOrigin | ( | TMCPoint & | outPoint | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetPen | ( | MCPenMode & | outPenMode,
|  | MCPenType & | outPenType,
|  | MCPenSize & | outSize,
|  | TMCRGBColor & | outColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetPenColor | ( | TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual boolean MCCOMAPI IMCGraphicContext::GetPixelColor | ( | TMCRGBColor & | outColor,
|  | MCXYPos | xPos,
|  | MCXYPos | yPos |
| ) |  |  | const`[pure virtual]`

virtual SystemGCPtr MCCOMAPI IMCGraphicContext::GetSystemGCPtr | ( | void |  | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetTextColor | ( | TMCRGBColor & | color | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::GetTextStyle | ( | TMCTextStyle & | newStyle | ) | `[pure virtual]`

virtual real32 MCCOMAPI IMCGraphicContext::GetTransparency | ( |  | ) | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::IntersectWithCurrentClip | ( | const TMCRect & | inRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::InvertHiliteRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::InvertRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::Line | ( | const MCXYPos | xDelta,
|  | const MCXYPos | yDelta |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::LineTo | ( | int32 | xPos,
|  | int32 | yPos |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::Move | ( | const MCXYPos | xDelta,
|  | const MCXYPos | yDelta |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::MoveTo | ( | int32 | xPos,
|  | int32 | yPos |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::PaintOval | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::PaintOvalArc | ( | const TMCRect & | theRect,
|  | real32 | begin,
|  | real32 | delta |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::PaintPoly | ( | const TMCPolygon & | apoly | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::PaintRect | ( | const TMCRect & | theRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::PaintRoundRect | ( | const TMCRect & | theRect,
|  | int16 | radius |
| ) |  |  | `[pure virtual]`

virtual uint32 MCCOMAPI IMCGraphicContext::PixelWidthToStringIndex | ( | const int32 | inPixelWidth,
|  | const TMCString & | inString |
| ) |  |  | const`[pure virtual]`

virtual uint32 MCCOMAPI IMCGraphicContext::PixelWidthToStringIndex | ( | const int32 | inPixelWidth,
|  | const TMCString & | inString,
|  | const TMCTextStyle & | inStyle |
| ) |  |  | const`[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::RemoveFromCurrentClip | ( | const TMCRect & | inRect | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::ResetPen | ( | void |  | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::RestoreClipRegion | ( | TMCRectRegion * | clipRgn | ) | `[pure virtual]`

Same than SetClipRegion, but the context will own the region (and delete it).

virtual void MCCOMAPI IMCGraphicContext::ScrollRect | ( | const TMCRect & | arect,
|  | MCXYPos | dX,
|  | MCXYPos | dY,
|  | TMCRect & | outHorizontalInval,
|  | TMCRect & | outVerticalInval |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetClipRegion | ( | TMCRectRegion * | clipRgn | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetEraseColor | ( | const TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetFillColor | ( | const TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetOrigin | ( | const TMCPoint & | inOrigin | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetPen | ( | MCPenMode | aPenMode,
|  | MCPenType | aPenType,
|  | MCPenSize | size,
|  | const TMCRGBColor & | inColor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetPenColor | ( | const TMCRGBColor & | inColor | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetPixel | ( | MCXYPos | xPos,
|  | MCXYPos | yPos,
|  | const TMCRGBColor & | acolor |
| ) |  |  | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetTextColor | ( | const TMCRGBColor & | color | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetTextStyle | ( | const TMCTextStyle & | newStyle | ) | `[pure virtual]`

virtual void MCCOMAPI IMCGraphicContext::SetTransparency | ( | real32 | inTransparency | ) | `[pure virtual]`

virtual uint32 MCCOMAPI IMCGraphicContext::StringWidth | ( | const TMCString & | astring,
|  | const TMCTextStyle & | inStyle |
| ) |  |  | const`[pure virtual]`

virtual uint32 MCCOMAPI IMCGraphicContext::StringWidth | ( | const TMCString & | astring | ) | const`[pure virtual]`

virtual real32 MCCOMAPI IMCGraphicContext::StringWidthReal | ( | const TMCString & | astring,
|  | const TMCTextStyle & | inStyle |
| ) |  |  | const`[pure virtual]`

virtual real32 MCCOMAPI IMCGraphicContext::StringWidthReal | ( | const TMCString & | astring | ) | const`[pure virtual]`

The documentation for this struct was generated from the following file:

- IMCGraphicContext.h