mirror of https://github.com/buggins/dlangui.git
tiled images support is working
This commit is contained in:
parent
ba53e802e6
commit
767e6734cb
|
@ -112,9 +112,10 @@ static if (USE_FREEIMAGE) {
|
||||||
//get the image width and height, and size per pixel
|
//get the image width and height, and size per pixel
|
||||||
int width = FreeImage_GetWidth(dib);
|
int width = FreeImage_GetWidth(dib);
|
||||||
int height = FreeImage_GetHeight(dib);
|
int height = FreeImage_GetHeight(dib);
|
||||||
int stride = FreeImage_GetLine(dib);
|
int stride = FreeImage_GetPitch(dib);
|
||||||
int bpp = FreeImage_GetBPP(dib);
|
int bpp = FreeImage_GetBPP(dib);
|
||||||
int pixelSize = (bpp + 7)/8;
|
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);
|
FREE_IMAGE_COLOR_TYPE colorType = FreeImage_GetColorType(dib);
|
||||||
int transparentIndex = 0;
|
int transparentIndex = 0;
|
||||||
int transparencyCount = 0;
|
int transparencyCount = 0;
|
||||||
|
|
|
@ -311,8 +311,6 @@ class ImageDrawable : Drawable {
|
||||||
buf.drawFragment(dst.left, dst.top, _image.get, src);
|
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 {
|
} else {
|
||||||
// rescaled or normal
|
// rescaled or normal
|
||||||
if (rc.width != _image.width || rc.height != _image.height)
|
if (rc.width != _image.width || rc.height != _image.height)
|
||||||
|
|
|
@ -823,7 +823,7 @@ version(USE_SDL) {
|
||||||
Log.d("SDL_WINDOWEVENT_ENTER");
|
Log.d("SDL_WINDOWEVENT_ENTER");
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_LEAVE:
|
case SDL_WINDOWEVENT_LEAVE:
|
||||||
Log.d("SDL_WINDOWEVENT_MAXIMIZED");
|
Log.d("SDL_WINDOWEVENT_LEAVE");
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||||
Log.d("SDL_WINDOWEVENT_FOCUS_GAINED");
|
Log.d("SDL_WINDOWEVENT_FOCUS_GAINED");
|
||||||
|
|
Loading…
Reference in New Issue