Go to the documentation of this file.00001
00002
00003
00004
00005 #ifdef HAVE_CONFIG_H
00006 #include "config_auto.h"
00007 #endif
00008
00009 #ifndef GRAPHICS_DISABLED
00010 #include "allheaders.h"
00011
00012 #include "svshowim.h"
00013 #include "scrollview.h"
00014
00015
00016
00017
00018
00019 void sv_show_sub_image(IMAGE* source,
00020 inT32 xstart,
00021 inT32 ystart,
00022 inT32 xext,
00023 inT32 yext,
00024 ScrollView* window,
00025 inT32 xpos,
00026 inT32 ypos) {
00027 Pix* pix;
00028 if (xstart != 0 || ystart != 0 ||
00029 xext != source->get_xsize() || yext != source->get_ysize()) {
00030 IMAGE sub_im;
00031 sub_im.create(xext, yext, source->get_bpp());
00032 copy_sub_image(source, xstart, ystart, xext, yext, &sub_im, 0, 0, false);
00033 pix = sub_im.ToPix();
00034 } else {
00035 pix = source->ToPix();
00036 }
00037 window->Image(pix, xpos, window->TranslateYCoordinate(yext) + ypos);
00038 pixDestroy(&pix);
00039 }
00040
00041 #endif // GRAPHICS_DISABLED
00042