diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-03-01 22:24:10 (GMT) |
---|---|---|
committer | Kristian Høgsberg <krh@src.gnome.org> | 2005-03-01 22:24:10 (GMT) |
commit | 02eb16fef45712a91e24f6471b9e2f31249c888e (patch) | |
tree | d5579258f1d7fbd5a280fb2f1b97b74004b1dea9 /pdf/splash/SplashState.cc | |
parent | 332afee84ff4eb7df326d96f07efd6f82a87c0a2 (diff) |
Use poppler instead of including xpdf source code. Poppler is a fork of
2005-03-01 Kristian Høgsberg <krh@redhat.com>
Use poppler instead of including xpdf source code. Poppler is a
fork of xpdf to build it as a shared library. See
http://freedesktop.org/wiki/Software/poppler.
* pdf/xpdf/*, pdf/goo/*, pdf/splash/*, pdf/fofi/*: Remove included
xpdf fork.
* pdf/Makefile.am: Build libpdfdocument.a here.
* pdf/GDKSplashOutputDev.cc:
* pdf/GDKSplashOutputDev.h:
* pdf/GnomeVFSStream.cc:
* pdf/GnomeVFSStream.h:
* pdf-document.cc:
* pdf-document.h:
* test-gdk-output-dev.cc
* Thumb.cc:
* Thumb.h: Pull these files out of pdf/xpdf and adjust to compile
against poppler.
Diffstat (limited to 'pdf/splash/SplashState.cc')
-rw-r--r-- | pdf/splash/SplashState.cc | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/pdf/splash/SplashState.cc b/pdf/splash/SplashState.cc deleted file mode 100644 index 7d5dc83..0000000 --- a/pdf/splash/SplashState.cc +++ /dev/null @@ -1,99 +0,0 @@ -//======================================================================== -// -// SplashState.cc -// -//======================================================================== - -#include <aconf.h> - -#ifdef USE_GCC_PRAGMAS -#pragma implementation -#endif - -#include <string.h> -#include "gmem.h" -#include "SplashPattern.h" -#include "SplashScreen.h" -#include "SplashClip.h" -#include "SplashState.h" - -//------------------------------------------------------------------------ -// SplashState -//------------------------------------------------------------------------ - -SplashState::SplashState(int width, int height) { - SplashColor color; - - memset(&color, 0, sizeof(SplashColor)); - strokePattern = new SplashSolidColor(color); - fillPattern = new SplashSolidColor(color); - screen = new SplashScreen(10); - lineWidth = 0; - lineCap = splashLineCapButt; - lineJoin = splashLineJoinMiter; - miterLimit = 10; - flatness = 1; - lineDash = NULL; - lineDashLength = 0; - lineDashPhase = 0; - clip = new SplashClip(0, 0, width - 1, height - 1); - next = NULL; -} - -SplashState::SplashState(SplashState *state) { - strokePattern = state->strokePattern->copy(); - fillPattern = state->fillPattern->copy(); - screen = state->screen->copy(); - lineWidth = state->lineWidth; - lineCap = state->lineCap; - lineJoin = state->lineJoin; - miterLimit = state->miterLimit; - flatness = state->flatness; - if (state->lineDash) { - lineDashLength = state->lineDashLength; - lineDash = (SplashCoord *)gmalloc(lineDashLength * sizeof(SplashCoord)); - memcpy(lineDash, state->lineDash, lineDashLength * sizeof(SplashCoord)); - } else { - lineDash = NULL; - lineDashLength = 0; - } - lineDashPhase = state->lineDashPhase; - clip = state->clip->copy(); - next = NULL; -} - -SplashState::~SplashState() { - delete strokePattern; - delete fillPattern; - delete screen; - gfree(lineDash); - delete clip; -} - -void SplashState::setStrokePattern(SplashPattern *strokePatternA) { - delete strokePattern; - strokePattern = strokePatternA; -} - -void SplashState::setFillPattern(SplashPattern *fillPatternA) { - delete fillPattern; - fillPattern = fillPatternA; -} - -void SplashState::setScreen(SplashScreen *screenA) { - delete screen; - screen = screenA; -} - -void SplashState::setLineDash(SplashCoord *lineDashA, int lineDashLengthA, - SplashCoord lineDashPhaseA) { - gfree(lineDash); - lineDashLength = lineDashLengthA; - if (lineDashLength > 0) { - lineDash = (SplashCoord *)gmalloc(lineDashLength * sizeof(SplashCoord)); - memcpy(lineDash, lineDashA, lineDashLength * sizeof(SplashCoord)); - } else { - lineDash = NULL; - } - lineDashPhase = lineDashPhaseA; -} |