Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/LTKOutputDev.cc
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-04-17 02:59:58 (GMT)
committer Arturo Espinosa <unammx@src.gnome.org>1999-04-17 02:59:58 (GMT)
commitd9f9a6449f377b4c933b75d57541b19c6d088994 (patch)
tree04f7f0c54447ef792fbf83bc5039174f4681b3bb /pdf/xpdf/LTKOutputDev.cc
Initial revision
Diffstat (limited to 'pdf/xpdf/LTKOutputDev.cc')
-rw-r--r--pdf/xpdf/LTKOutputDev.cc57
1 files changed, 57 insertions, 0 deletions
diff --git a/pdf/xpdf/LTKOutputDev.cc b/pdf/xpdf/LTKOutputDev.cc
new file mode 100644
index 0000000..8b376e4
--- /dev/null
+++ b/pdf/xpdf/LTKOutputDev.cc
@@ -0,0 +1,57 @@
+//========================================================================
+//
+// LTKOutputDev.cc
+//
+// Copyright 1998 Derek B. Noonburg
+//
+//========================================================================
+
+#ifdef __GNUC__
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#include "gmem.h"
+#include "GString.h"
+#include "LTKWindow.h"
+#include "LTKScrollingCanvas.h"
+#include "Object.h"
+#include "Stream.h"
+#include "GfxState.h"
+#include "GfxFont.h"
+#include "Error.h"
+#include "Params.h"
+#include "LTKOutputDev.h"
+
+//------------------------------------------------------------------------
+
+LTKOutputDev::LTKOutputDev(LTKWindow *win1, unsigned long paperColor):
+ XOutputDev(win1->getDisplay(),
+ ((LTKScrollingCanvas *)win1->findWidget("canvas"))->getPixmap(),
+ 0, win1->getColormap(), paperColor)
+{
+ win = win1;
+ canvas = (LTKScrollingCanvas *)win->findWidget("canvas");
+ setPixmap(canvas->getPixmap(),
+ canvas->getRealWidth(), canvas->getRealHeight());
+}
+
+LTKOutputDev::~LTKOutputDev() {
+}
+
+void LTKOutputDev::startPage(int pageNum, GfxState *state) {
+ canvas->resize((int)(state->getPageWidth() + 0.5),
+ (int)(state->getPageHeight() + 0.5));
+ setPixmap(canvas->getPixmap(),
+ canvas->getRealWidth(), canvas->getRealHeight());
+ XOutputDev::startPage(pageNum, state);
+ canvas->redraw();
+}
+
+void LTKOutputDev::dump() {
+ canvas->redraw();
+ XOutputDev::dump();
+}