bounds = tempRect;
- if (!drawRect.IsEmpty())
+ if (!tempRect.IsEmpty() && drawRect.x>=0.0f && drawRect.y>=0.0f)
{
if (pRenderTarget && HAVE_SURFACE(pRenderTarget)) // If element have surface , justly draw to the canvas
{
for (int i = 0; i < count; i++)
{
pChild = __children.GetChildAt(i);
- if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild)))
+ if (unlikely(!pChild) || unlikely(!VE_VISIBLE(pChild)) || clipBounds.IsEmpty() ||
+ (!__childrenTransform.IsIdentity() && !_MatrixUtilIsTranslation(__childrenTransform)) ||
+ (!pChild->__transform.IsIdentity() && !_MatrixUtilIsTranslation(pChild->__transform)) )
{
continue;
- }
+ }
pChild->CaptureI(outputCanvas, rectDest, reference, rectRef, clipBounds, true, depth + 1);
}
}