example:
int bgimg = agk::LoadImage ("data/gfx/bg/bg01.png");
int bgmask00 = agk::CreateSprite (bgimg);
agk::SetSpriteScissor (bgmask00, 0, 0, 640, 160);
int bg_mask[25];
for (int c1=1; c1<=20; c1++)
{
bg_mask[c1] = agk::CreateSprite (bgimg);
agk::SetSpriteScissor (bg_mask[c1], 0, 159.0f+c1, 640, 160.0f+c1);
agk::SetSpriteColorAlpha (bg_mask[c1], 255-(c1*9));
}
agk::Sync();
int bgmaskimg = agk::GetImage (0, 0, 640, 180);
agk::DeleteSprite (bgmask00);
for (int c1=1; c1<=20; c1++)
{
agk::DeleteSprite (bg_mask[c1]);
}
bgmask.id = agk::CreateSprite (bgmaskimg);
agk::SetSpriteVisible(bgmask.id, 1);
agk::SetSpriteDepth(bgmask.id, depth_bgmask);
bg01.png can be any 640x960 picture. I am grabbing the top 160pixels part, and then the next 20 pixels are set to different transparency levels to create a transparent gradient effect. all works fine until then.
i would then like to getimage this image i constructed, preserving the transparency, to use as a mask. this part is failing. the lower 20pixels that should be semi transparent are opaque.
at this point i just want to know if this is possible with agk, or if getimage will not support this kind of image grabbing over a transparent background.