30 #include "gui/base/gui_image.h"
31 #include "util/structures/rect.h"
32 #include "video/image.h"
34 #include "sdl_gui_graphics.h"
38 setTarget(SDL_GetVideoSurface());
41 void SdlGuiGraphics::drawImage(
const gcn::Image* image,
int srcX,
int srcY,
int dstX,
int dstY,
int width,
int height) {
42 const GuiImage* g_img =
dynamic_cast<const GuiImage*
>(image);
44 Image& fifeimg = m_pool.getImage(g_img->getPoolId());
45 const gcn::ClipRectangle& clip = getCurrentClipArea();
46 Rect rect(dstX, dstY, width, height);
47 rect.x += clip.xOffset;
48 rect.y += clip.yOffset;
49 fifeimg.
render(rect, mTarget);