GapiDraw blits don't showing a surface when it not fully inside the screen (or destination surface), so you should manipulate surfaceRect parameter to avoid getting to the edje. Use the same method for the alphaRect.
I'am using following code for it:
- Code:
void SurfaceVO::show(CGapiSurface* dest) {
Rect surfaceRect(x0, y0, x0 + w, y0 + h);
int _x = x;
int _y = y;
int dw = dest->GetWidth();
int dh = dest->GetHeight();
if(x < 0) {
surfaceRect.left -= x;
_x = 0;
}
if(x + w > dw) {
int diff = x + w - dw;
surfaceRect.right -= diff;
}
if(y < 0) {
surfaceRect.top -= y;
_y = 0;
}
if(y + h > dh) {
int diff = y + h - dh;
surfaceRect.bottom -= diff;
}
if (!localAlpha)
r = dest->BltFast(_x, _y, surface, &surfaceRect, bltFastFlags, &blitFX);
else
{
surfaceRect.bottom = y0+h;
Rect alphaRect(surfaceRect.left, surfaceRect.top + h,
surfaceRect.right, surfaceRect.bottom + h);
r = dest->AlphaBltFast(_x, _y, surface, &surfaceRect,
surface, &alphaRect, 0, NULL);
}
}
I'am not sure that my explanation on English is understandable, but this code should answer on your question.
Best regards,
AndreyT.