void CWsSpriteBase::CalcRedrawRegion(const TRegion& aSourceRegion, TRegion& aTarget) const { aTarget.Copy(aSourceRegion); if (ClipSprite()) { TPoint origin(0,0); if(iWin) origin = iWin->Origin(); TRect rect(iBasePos + origin + iClipOffset, iClipSize); aTarget.ClipRect(rect); } aTarget.ClipRect(RootWindow()->Abs()); // Only need to draw if the region being redrawn overlaps the sprite const TRect spriteRect(Pos(), iSize); STACK_REGION spriteRegion; spriteRegion.AddRect(spriteRect); aTarget.Intersect(spriteRegion); spriteRegion.Close(); }
void CWsWindow::AreaCovered(TRegion &aRegion) { aRegion.Copy(WindowArea()); }