tiled images support is working

This commit is contained in:
Vadim Lopatin 2014-05-20 16:36:00 +04:00
parent ba53e802e6
commit 767e6734cb
3 changed files with 3 additions and 4 deletions

View File

@ -112,9 +112,10 @@ static if (USE_FREEIMAGE) {
//get the image width and height, and size per pixel
int width = FreeImage_GetWidth(dib);
int height = FreeImage_GetHeight(dib);
int stride = FreeImage_GetLine(dib);
int stride = FreeImage_GetPitch(dib);
int bpp = FreeImage_GetBPP(dib);
int pixelSize = (bpp + 7)/8;
//Log.d("image ", width, "x", height, " stride ", stride, "(", stride / pixelSize, ") bpp ", bpp, " pixelSize ", pixelSize);
FREE_IMAGE_COLOR_TYPE colorType = FreeImage_GetColorType(dib);
int transparentIndex = 0;
int transparencyCount = 0;

View File

@ -311,8 +311,6 @@ class ImageDrawable : Drawable {
buf.drawFragment(dst.left, dst.top, _image.get, src);
}
}
buf.drawImage(rc.left + 30, rc.top + 30, _image);
buf.drawFrame(Rect(rc.left + 30, rc.top + 30, rc.left + imgdx + 30, rc.top + imgdy + 30), 0x80800000, Rect(2,2,2,2));
} else {
// rescaled or normal
if (rc.width != _image.width || rc.height != _image.height)

View File

@ -823,7 +823,7 @@ version(USE_SDL) {
Log.d("SDL_WINDOWEVENT_ENTER");
break;
case SDL_WINDOWEVENT_LEAVE:
Log.d("SDL_WINDOWEVENT_MAXIMIZED");
Log.d("SDL_WINDOWEVENT_LEAVE");
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
Log.d("SDL_WINDOWEVENT_FOCUS_GAINED");