Page 1 of 1

Bug Report, v3.60: AlphaBlt() with GDALPHABLT_MIRRORLEFTRIGH

PostPosted: Feb 22, 2007 @ 10:56pm
by Bunkai
Hello,

I use my Tile set to draw background. Some tiles are expected to be drawn horizontally flipped. I use AlphaBlt as follows:

CGlobalVariables::pBackBuffer->AlphaBlt(&rectDest, strCurrentLayer->pTileSetRGB, &rectSource, strCurrentLayer->pTileSetAlpha, &rectSource, GDALPHABLT_MIRRORLEFTRIGHT, NULL );

I double checked everything, and it gets drawn fine anywhere in the display but left edge clipping causes problems.

As my tile gets partilally before and partially after the left edge, drawing the tile misbehaves. The tile starts drawing always from display's X[0], although it should start from negative value, where the remainder of the tile would be seen. In this case, always the origin of the tile is seen, if the tile is left-clipped.

an example: a horizontally flipped tile(48x48 pixels) is placed on -20 X position. Although the tile would be expected to draw from that position, where only remaining 28 pixels would be seen on the display, when using GDALPHABLT_MIRRORLEFTRIGHT, the tile starts drawing always from 0 X screen position. It means that the leftmost part of the tile, that should be behind the left display edge and hidden, is always visible on the screen.

As I removed GDALPHABLT_MIRRORLEFTRIGHT, the bug dissapeared. However, how to draw XFlipped ties then. I tried Blt() with GDALPHABLT_MIRRORLEFTRIGHT as well, but nothing helps.

Please, is this really a bug, and is here any chance, it gets fixed soon? Thank you an with regards,
Rene.

PostPosted: Feb 23, 2007 @ 6:07am
by InexorableTash

PostPosted: Feb 23, 2007 @ 9:37pm
by Bunkai

PostPosted: Feb 24, 2007 @ 6:10am
by InexorableTash