1 //========================================================================
5 // Copyright 1998-2002 Glyph & Cog, LLC
7 //========================================================================
10 #pragma implementation
20 #include "LTKWindow.h"
21 #include "LTKScrollingCanvas.h"
27 #include "LTKOutputDev.h"
29 //------------------------------------------------------------------------
31 LTKOutputDev::LTKOutputDev(LTKWindow *winA, GBool reverseVideoA,
32 unsigned long paperColor, GBool installCmap,
33 GBool rgbCubeSize, GBool incrementalUpdateA):
34 XOutputDev(winA->getDisplay(),
35 ((LTKScrollingCanvas *)winA->findWidget("canvas"))->getPixmap(),
36 0, winA->getColormap(), reverseVideoA, paperColor,
37 installCmap, rgbCubeSize)
40 canvas = (LTKScrollingCanvas *)win->findWidget("canvas");
41 setPixmap(canvas->getPixmap(),
42 canvas->getRealWidth(), canvas->getRealHeight());
43 incrementalUpdate = incrementalUpdateA;
46 LTKOutputDev::~LTKOutputDev() {
49 void LTKOutputDev::startPage(int pageNum, GfxState *state) {
50 canvas->resize((int)(state->getPageWidth() + 0.5),
51 (int)(state->getPageHeight() + 0.5));
52 setPixmap(canvas->getPixmap(),
53 canvas->getRealWidth(), canvas->getRealHeight());
54 XOutputDev::startPage(pageNum, state);
55 if (incrementalUpdate) {
60 void LTKOutputDev::endPage() {
61 if (!incrementalUpdate) {
64 XOutputDev::endPage();
67 void LTKOutputDev::dump() {
68 if (incrementalUpdate) {