# TMCPixelFX Class Reference
[MCCore]

List of all members.

## Classes
struct | SGaussTable
## Public Member Functions
| TMCPixelFX ()
virtual | ~TMCPixelFX ()
boolean | IsValid ()
void | ClipRect (const TMCRect *_clip)
TMCRect | GetClipRect ()
void | SetChopProc (ChopProc proc)
ChopProc | GetChopProc ()
void | SetTransparency (real32 amt)
real32 | GetTransparency ()
void | SetTranslateTable (void *xlate)
void * | GetTranslateTable ()
boolean | AdjustBlitRects (TMCRect *totalsrc, TMCRect *totaldst, TMCRect *srcRect, TMCRect *dstRect)
boolean | BucketInvertRect (TMCPixelBucket *bucket, const TMCRect *rect, boolean colorblit, boolean alphablit)
boolean | BucketFillAlphaRect (TMCPixelBucket *bucket, const TMCRect *rect, uint32 color)
boolean | BucketFillColorRect (TMCPixelBucket *bucket, const TMCRect *rect, uint32 color)
boolean | BucketFillRect (TMCPixelBucket *bucket, const TMCRect *rect, uint32 color)
boolean | BucketScrollRect (TMCPixelBucket *bucket, const TMCRect *rectptr, int32 x, int32 y)
boolean | BucketBlit (TMCPixelBucket *dst, const TMCRect *origDstRect, const TMCPixelBucket *src, const TMCRect *origSrcRect, boolean dither, boolean useSrcAlpha)
boolean | BucketBlitDecompress (TMCPixelBucket &inDestBucket, const TMCRect &inDstRect, const TMCRLEPixels *inSrcPixels, const TMCRect &inSrcRect, uint32 inColor)
boolean | BucketBlit32FromGray8 (TMCPixelBucket *dst, const TMCRect *dstrectptr, const TMCPixelBucket *src, const TMCRect *srcrectptr, uint32 color)
boolean | BucketBlit32FromGray8WNoResample (TMCPixelBucket *dst, const TMCPoint *dstrecttopleftptr, const TMCPixelBucket *src, const TMCRect *srcrectptr, uint32 color)
boolean | BucketBlitExtractAlpha8From32 (TMCPixelBucket *dst, const TMCRect *dstrectptr, const TMCPixelBucket *src, const TMCRect *srcrectptr)
boolean | BucketBlitExtractAlpha8From32WNoResample (TMCPixelBucket *dst, const TMCPoint *dstrecttopleftptr, const TMCPixelBucket *src, const TMCRect *srcrectptr)
boolean | BucketBlit8FromGray8 (TMCPixelBucket *dst, const TMCRect *dstrectptr, const TMCPixelBucket *src, const TMCRect *srcrectptr, uint32 color)
boolean | AllocGaussTable (SGaussTable *gauss, real32 maxradius, int32 width, int32 height)
boolean | ComputeGaussTable (SGaussTable *gauss, real32 radius, boolean horizontal, boolean vertical)
void | DestroyGaussTable (SGaussTable *gauss)
boolean | BucketGauss32 (TMCPixelBucket *bucket, const TMCRect *rectptr, real32 radius, SGaussTable *gauss)
boolean | BucketGauss8 (TMCPixelBucket *bucket, const TMCRect *rectptr, real32 radius, SGaussTable *gauss)
void | FlipBlitRect (TMCPixelBucket *bucket, TMCRect *rect)
boolean | CompatiblePixelBuckets (const TMCPixelBucket *src, const TMCPixelBucket *dst)
boolean | EqualBuckets (const TMCPixelBucket *src, const TMCPixelBucket *dst)
boolean | BucketFillRectAlphaOrColor (TMCPixelBucket *bucket, const TMCRect *rect, uint32 color, boolean colorblit, boolean alphablt, real32 transparency, ChopProc chopproc)
boolean | BucketBlitEqualRect32 (TMCPixelBucket *dst, const TMCRect *dstRect, const TMCPixelBucket *src, const TMCRect *srcRect, int32 alpha=256, boolean useSrcAlpha=false, ChopProc chopproc=(ChopProc) 0)
boolean | BucketBlitNotEqualRect32 (TMCPixelBucket *dst, const TMCRect *dstRect, const TMCPixelBucket *src, const TMCRect *srcRect, int32 alpha=256, boolean useSrcAlpha=false, ChopProc chopproc=(ChopProc) 0)
boolean | BucketBlitSampledRect32 (TMCPixelBucket *dst, const TMCRect *dstRect, const TMCPixelBucket *src, const TMCRect *srcRect, int32 alpha=256, boolean useSrcAlpha=false, ChopProc chopproc=(ChopProc) 0)
boolean | BucketBlitResize32 (TMCPixelBucket *dst, const TMCRect &dstRect, const TMCPixelBucket *src, const TMCRect &srcRect)
boolean | BucketBlitDown2x (TMCPixelBucket *dst, const TMCPixelBucket *src)
void | DrawScanLineWithAlpha (const register uint32 *src, register uint32 *dst, uint32 dstw)
void | DrawScanLineWithAlphaTransparent (const register uint32 *src, register uint32 *dst, uint32 dstw, int32 *alphaarray)
void | LinearBlendScanLine (uint32 *dstptr, const uint32 *srcptr, const uint32 *srcrownext, int32 cursrcx, int32 srcw, int32 dstw, int32 errV, int32 hscale)
void | LinearBlendScanLineWithAlpha (uint32 *dstptr, const uint32 *srcptr, const uint32 *srcrownext, int32 cursrcx, int32 srcw, int32 dstw, int32 errV, int32 hscale)
boolean | BucketBlitEqualRect32VerticalGradient (TMCPixelBucket *dst, const TMCRect *dstRect, const TMCPixelBucket *src, const TMCRect *srcRect, uint32 alphaStart, const uint32 alphaEnd, const uint32 color=0x00000000)
boolean | BucketBlitEqualRect32VerticalGradient (DoPixelFXData *data)
boolean | BucketBlit32VerticalGradient (TMCPixelBucket *dst, const TMCRect *dstRect, uint32 alphaStart, const uint32 alphaEnd, const uint32 colorStart, const uint32 colorEnd)
boolean | BucketBlit32VerticalGradient (DoPixelFXData *data)
boolean | BucketBlit32HorizontalGradient (TMCPixelBucket *dst, const TMCRect *dstRect, uint32 alphaStart, const uint32 alphaEnd, const uint32 colorStart, const uint32 colorEnd)
boolean | BucketBlit32HorizontalGradient (DoPixelFXData *data)
boolean | DrawLine32 (TMCPixelBucket *dst, TMCPoint &pA, TMCPoint &pB, uint32 color=0x00000000, const TMCRect *clipRect=(TMCRect *) 0)
boolean | DrawLine32Antialiased (TMCPixelBucket *dst, TMCPoint &pA, TMCPoint &pB, uint32 color=0x00000000, const TMCRect *clipRect=(TMCRect *) 0)
boolean | DrawLine32AntialiasedAlphaChopProc (TMCPixelBucket *dst, TMCPoint &pA, TMCPoint &pB, uint32 color=0x00000000, const TMCRect *clipRect=(TMCRect *) 0, int32 alpha=0xff, ChopProc chopproc=(ChopProc) 0)
boolean | DrawLine32 (DoPixelFXData *data)
boolean | DrawLine32Antialiased (DoPixelFXData *data)
## Static Public Member Functions
static void | FastBucketBlit (const TMCPixelBucket &dst, const TMCPixelBucket &src, const TMCRect &rect)
static void | FastBucketBlit (const TMCPixelBucket &dst, const TMCRect &dstRect, const TMCPixelBucket &src, const TMCRect &srcRect)
static void | FastBucketFill (const TMCPixelBucket &pixelBucket, uint32 color)
static void | FullBucketBlit (const TMCPixelBucket &dst, const TMCPixelBucket &src)
## Protected Attributes
TMCRect | fRectSrc
TMCRect | fRectDst
TMCRect | fRectClip
ChopProc | fChopproc
real32 | fTransparency
void * | fXlateTable

## Detailed Description

TMCPixelFX is a class used to help the blit of TMCPixelBucket(s) (with different effects including resizing). It is generally used to blit a TMCPixelBucket into an IMCGraphicContext. Here is an example:

            void MCCOMAPI TPreviewPart::SelfDraw(IMCGraphicContext* graphicContext, const TMCRect& inZone)
            {
                    //fOffscreen is a TMCOffscreen*
                    if (MCVerify(graphicContext != NULL && fOffscreen != NULL))
                    {
                            uint32 dstX = inZone.GetWidth ();
                            uint32 dstY = inZone.GetHeight();

                            if ( (dstX > 1) && (dstY > 1) ) //TMCPixelFX::BucketBlitResize32 doesn't work
                            {
                                    TMCRect srcRect= fOffscreen->GetRect();
                                    TMCRect dstRect;
                                    TMCPoint offScreenSize( fOffscreen->GetWidth(), fOffscreen->GetHeight() );
                                    dstRect.MaximizeInside(TMCRect(0, 0, fBounds.GetWidth(), fBounds.GetHeight()), offScreenSize);

                                    TMCPixelFX pixelFX;
                                    graphicContext->BlitBucket(fOffscreen->PixelBucket(), srcRect, dstRect, inZone, &pixelFX);
                            }
                    }
            }

## Constructor & Destructor Documentation

TMCPixelFX::TMCPixelFX | ( |  | ) |

virtual TMCPixelFX::~TMCPixelFX | ( |  | ) | `[virtual]`

## Member Function Documentation

boolean TMCPixelFX::AdjustBlitRects | ( | TMCRect * | totalsrc,
|  | TMCRect * | totaldst,
|  | TMCRect * | srcRect,
|  | TMCRect * | dstRect |
| ) |  |  |

boolean TMCPixelFX::AllocGaussTable | ( | SGaussTable * | gauss,
|  | real32 | maxradius,
|  | int32 | width,
|  | int32 | height |
| ) |  |  |

boolean TMCPixelFX::BucketBlit | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | origDstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | origSrcRect,
|  | boolean | dither,
|  | boolean | useSrcAlpha |
| ) |  |  |

boolean TMCPixelFX::BucketBlit32FromGray8 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstrectptr,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcrectptr,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketBlit32FromGray8WNoResample | ( | TMCPixelBucket * | dst,
|  | const TMCPoint * | dstrecttopleftptr,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcrectptr,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketBlit32HorizontalGradient | ( | DoPixelFXData * | data | ) |

boolean TMCPixelFX::BucketBlit32HorizontalGradient | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | uint32 | alphaStart,
|  | const uint32 | alphaEnd,
|  | const uint32 | colorStart,
|  | const uint32 | colorEnd |
| ) |  |  |

perform Horizontal gradient on dst & color put result on dst

boolean TMCPixelFX::BucketBlit32VerticalGradient | ( | DoPixelFXData * | data | ) |

boolean TMCPixelFX::BucketBlit32VerticalGradient | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | uint32 | alphaStart,
|  | const uint32 | alphaEnd,
|  | const uint32 | colorStart,
|  | const uint32 | colorEnd |
| ) |  |  |

perform Vertical gradient on dst & color put result on dst

boolean TMCPixelFX::BucketBlit8FromGray8 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstrectptr,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcrectptr,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketBlitDecompress | ( | TMCPixelBucket & | inDestBucket,
|  | const TMCRect & | inDstRect,
|  | const TMCRLEPixels * | inSrcPixels,
|  | const TMCRect & | inSrcRect,
|  | uint32 | inColor |
| ) |  |  |

boolean TMCPixelFX::BucketBlitDown2x | ( | TMCPixelBucket * | dst,
|  | const TMCPixelBucket * | src |
| ) |  |  |

== BucketBlitResize32 = BucketBlitResize32 with srcRect = 2*dstRect

boolean TMCPixelFX::BucketBlitEqualRect32 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcRect,
|  | int32 | alpha = `256`,
|  | boolean | useSrcAlpha = `false`,
|  | ChopProc | chopproc = `(ChopProc) 0` |
| ) |  |  |

boolean TMCPixelFX::BucketBlitEqualRect32VerticalGradient | ( | DoPixelFXData * | data | ) |

boolean TMCPixelFX::BucketBlitEqualRect32VerticalGradient | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcRect,
|  | uint32 | alphaStart,
|  | const uint32 | alphaEnd,
|  | const uint32 | color = `0x00000000` |
| ) |  |  |

preform gradient of src & color put result on dst

boolean TMCPixelFX::BucketBlitExtractAlpha8From32 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstrectptr,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcrectptr |
| ) |  |  |

boolean TMCPixelFX::BucketBlitExtractAlpha8From32WNoResample | ( | TMCPixelBucket * | dst,
|  | const TMCPoint * | dstrecttopleftptr,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcrectptr |
| ) |  |  |

boolean TMCPixelFX::BucketBlitNotEqualRect32 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcRect,
|  | int32 | alpha = `256`,
|  | boolean | useSrcAlpha = `false`,
|  | ChopProc | chopproc = `(ChopProc) 0` |
| ) |  |  |

boolean TMCPixelFX::BucketBlitResize32 | ( | TMCPixelBucket * | dst,
|  | const TMCRect & | dstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect & | srcRect |
| ) |  |  |

BucketBlitResize32 = BucketBlitNotEqualRect32 with alpha=256 useSrcAlpha=false chopproc=0

boolean TMCPixelFX::BucketBlitSampledRect32 | ( | TMCPixelBucket * | dst,
|  | const TMCRect * | dstRect,
|  | const TMCPixelBucket * | src,
|  | const TMCRect * | srcRect,
|  | int32 | alpha = `256`,
|  | boolean | useSrcAlpha = `false`,
|  | ChopProc | chopproc = `(ChopProc) 0` |
| ) |  |  |

boolean TMCPixelFX::BucketFillAlphaRect | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rect,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketFillColorRect | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rect,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketFillRect | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rect,
|  | uint32 | color |
| ) |  |  |

boolean TMCPixelFX::BucketFillRectAlphaOrColor | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rect,
|  | uint32 | color,
|  | boolean | colorblit,
|  | boolean | alphablt,
|  | real32 | transparency,
|  | ChopProc | chopproc |
| ) |  |  |

boolean TMCPixelFX::BucketGauss32 | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rectptr,
|  | real32 | radius,
|  | SGaussTable * | gauss |
| ) |  |  |

boolean TMCPixelFX::BucketGauss8 | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rectptr,
|  | real32 | radius,
|  | SGaussTable * | gauss |
| ) |  |  |

boolean TMCPixelFX::BucketInvertRect | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rect,
|  | boolean | colorblit,
|  | boolean | alphablit |
| ) |  |  |

boolean TMCPixelFX::BucketScrollRect | ( | TMCPixelBucket * | bucket,
|  | const TMCRect * | rectptr,
|  | int32 | x,
|  | int32 | y |
| ) |  |  |

void TMCPixelFX::ClipRect | ( | const TMCRect * | _clip | ) | `[inline]`

boolean TMCPixelFX::CompatiblePixelBuckets | ( | const TMCPixelBucket * | src,
|  | const TMCPixelBucket * | dst |
| ) |  |  |

boolean TMCPixelFX::ComputeGaussTable | ( | SGaussTable * | gauss,
|  | real32 | radius,
|  | boolean | horizontal,
|  | boolean | vertical |
| ) |  |  |

void TMCPixelFX::DestroyGaussTable | ( | SGaussTable * | gauss | ) |

boolean TMCPixelFX::DrawLine32 | ( | DoPixelFXData * | data | ) |

boolean TMCPixelFX::DrawLine32 | ( | TMCPixelBucket * | dst,
|  | TMCPoint & | pA,
|  | TMCPoint & | pB,
|  | uint32 | color = `0x00000000`,
|  | const TMCRect * | clipRect = `(TMCRect *) 0` |
| ) |  |  |

boolean TMCPixelFX::DrawLine32Antialiased | ( | DoPixelFXData * | data | ) |

boolean TMCPixelFX::DrawLine32Antialiased | ( | TMCPixelBucket * | dst,
|  | TMCPoint & | pA,
|  | TMCPoint & | pB,
|  | uint32 | color = `0x00000000`,
|  | const TMCRect * | clipRect = `(TMCRect *) 0` |
| ) |  |  |

boolean TMCPixelFX::DrawLine32AntialiasedAlphaChopProc | ( | TMCPixelBucket * | dst,
|  | TMCPoint & | pA,
|  | TMCPoint & | pB,
|  | uint32 | color = `0x00000000`,
|  | const TMCRect * | clipRect = `(TMCRect *) 0`,
|  | int32 | alpha = `0xff`,
|  | ChopProc | chopproc = `(ChopProc) 0` |
| ) |  |  |

void TMCPixelFX::DrawScanLineWithAlpha | ( | const register uint32 * | src,
|  | register uint32 * | dst,
|  | uint32 | dstw |
| ) |  |  |

void TMCPixelFX::DrawScanLineWithAlphaTransparent | ( | const register uint32 * | src,
|  | register uint32 * | dst,
|  | uint32 | dstw,
|  | int32 * | alphaarray |
| ) |  |  |

boolean TMCPixelFX::EqualBuckets | ( | const TMCPixelBucket * | src,
|  | const TMCPixelBucket * | dst |
| ) |  |  |

static void TMCPixelFX::FastBucketBlit | ( | const TMCPixelBucket & | dst,
|  | const TMCRect & | dstRect,
|  | const TMCPixelBucket & | src,
|  | const TMCRect & | srcRect |
| ) |  |  | `[static]`

blit bucket to bucket

static void TMCPixelFX::FastBucketBlit | ( | const TMCPixelBucket & | dst,
|  | const TMCPixelBucket & | src,
|  | const TMCRect & | rect |
| ) |  |  | `[inline, static]`

blit a pixel bucket to a bucket with the same rect

static void TMCPixelFX::FastBucketFill | ( | const TMCPixelBucket & | pixelBucket,
|  | uint32 | color |
| ) |  |  | `[static]`

fill an entire pixel bucket with a color

void TMCPixelFX::FlipBlitRect | ( | TMCPixelBucket * | bucket,
|  | TMCRect * | rect |
| ) |  |  |

static void TMCPixelFX::FullBucketBlit | ( | const TMCPixelBucket & | dst,
|  | const TMCPixelBucket & | src |
| ) |  |  | `[static]`

blit an entire pixel bucket to a bucket with the same size

ChopProc TMCPixelFX::GetChopProc | ( |  | ) | `[inline]`

TMCRect TMCPixelFX::GetClipRect | ( |  | ) | `[inline]`

void* TMCPixelFX::GetTranslateTable | ( |  | ) | `[inline]`

real32 TMCPixelFX::GetTransparency | ( |  | ) | `[inline]`

boolean TMCPixelFX::IsValid | ( | void |  | ) | `[inline]`

void TMCPixelFX::LinearBlendScanLine | ( | uint32 * | dstptr,
|  | const uint32 * | srcptr,
|  | const uint32 * | srcrownext,
|  | int32 | cursrcx,
|  | int32 | srcw,
|  | int32 | dstw,
|  | int32 | errV,
|  | int32 | hscale |
| ) |  |  |

void TMCPixelFX::LinearBlendScanLineWithAlpha | ( | uint32 * | dstptr,
|  | const uint32 * | srcptr,
|  | const uint32 * | srcrownext,
|  | int32 | cursrcx,
|  | int32 | srcw,
|  | int32 | dstw,
|  | int32 | errV,
|  | int32 | hscale |
| ) |  |  |

void TMCPixelFX::SetChopProc | ( | ChopProc | proc | ) | `[inline]`

void TMCPixelFX::SetTranslateTable | ( | void * | xlate | ) | `[inline]`

void TMCPixelFX::SetTransparency | ( | real32 | amt | ) | `[inline]`

## Member Data Documentation

ChopProc TMCPixelFX::fChopproc`[protected]`

TMCRect TMCPixelFX::fRectClip`[protected]`

TMCRect TMCPixelFX::fRectDst`[protected]`

TMCRect TMCPixelFX::fRectSrc`[protected]`

real32 TMCPixelFX::fTransparency`[protected]`

void* TMCPixelFX::fXlateTable`[protected]`

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

- MCPixelFX.h