Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
svshowim.cpp File Reference
#include "allheaders.h"
#include "svshowim.h"
#include "scrollview.h"

Go to the source code of this file.

Functions

void sv_show_sub_image (IMAGE *source, inT32 xstart, inT32 ystart, inT32 xext, inT32 yext, ScrollView *window, inT32 xpos, inT32 ypos)
 

Function Documentation

void sv_show_sub_image ( IMAGE source,
inT32  xstart,
inT32  ystart,
inT32  xext,
inT32  yext,
ScrollView window,
inT32  xpos,
inT32  ypos 
)

Definition at line 19 of file svshowim.cpp.

26  { // Y position.
27  Pix* pix;
28  if (xstart != 0 || ystart != 0 ||
29  xext != source->get_xsize() || yext != source->get_ysize()) {
30  IMAGE sub_im;
31  sub_im.create(xext, yext, source->get_bpp());
32  copy_sub_image(source, xstart, ystart, xext, yext, &sub_im, 0, 0, false);
33  pix = sub_im.ToPix();
34  } else {
35  pix = source->ToPix();
36  }
37  window->Image(pix, xpos, window->TranslateYCoordinate(yext) + ypos);
38  pixDestroy(&pix);
39 }
DLLSYM void copy_sub_image(IMAGE *source, inT32 xstart, inT32 ystart, inT32 xext, inT32 yext, IMAGE *dest, inT32 xdest, inT32 ydest, BOOL8 adjust_grey)
Definition: imgs.cpp:270
inT32 get_ysize()
Definition: img.h:99
int TranslateYCoordinate(int y)
Definition: scrollview.cpp:863
void Image(struct Pix *image, int x_pos, int y_pos)
Definition: scrollview.cpp:768
inT8 get_bpp()
Definition: img.h:106
inT32 get_xsize()
Definition: img.h:92
Definition: img.h:51
inT8 create(inT32 x, inT32 y, inT8 bits_per_pixel)
Definition: imgs.cpp:121
Pix * ToPix()
Definition: imgs.cpp:1501