1 //========================================================================
5 // Copyright 1998 Derek B. Noonburg
7 //========================================================================
10 #pragma implementation
19 #include "LTKWindow.h"
20 #include "LTKScrollingCanvas.h"
27 #include "LTKOutputDev.h"
29 //------------------------------------------------------------------------
31 LTKOutputDev::LTKOutputDev(LTKWindow *win1, unsigned long paperColor):
32 XOutputDev(win1->getDisplay(),
33 ((LTKScrollingCanvas *)win1->findWidget("canvas"))->getPixmap(),
34 0, win1->getColormap(), paperColor)
37 canvas = (LTKScrollingCanvas *)win->findWidget("canvas");
38 setPixmap(canvas->getPixmap(),
39 canvas->getRealWidth(), canvas->getRealHeight());
42 LTKOutputDev::~LTKOutputDev() {
45 void LTKOutputDev::startPage(int pageNum, GfxState *state) {
46 canvas->resize((int)(state->getPageWidth() + 0.5),
47 (int)(state->getPageHeight() + 0.5));
48 setPixmap(canvas->getPixmap(),
49 canvas->getRealWidth(), canvas->getRealHeight());
50 XOutputDev::startPage(pageNum, state);
54 void LTKOutputDev::dump() {