diff options
author | Calvin Morrison <calvin@pobox.com> | 2023-04-05 14:13:39 -0400 |
---|---|---|
committer | Calvin Morrison <calvin@pobox.com> | 2023-04-05 14:13:39 -0400 |
commit | 835e373b3eeaabcd0621ed6798ab500f37982fae (patch) | |
tree | dfa16b0e2e1b4956b38f693220eac4e607802133 /xpdf/TileCompositor.h |
Diffstat (limited to 'xpdf/TileCompositor.h')
-rw-r--r-- | xpdf/TileCompositor.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/xpdf/TileCompositor.h b/xpdf/TileCompositor.h new file mode 100644 index 0000000..aa06c9d --- /dev/null +++ b/xpdf/TileCompositor.h @@ -0,0 +1,77 @@ +//======================================================================== +// +// TileCompositor.h +// +// Copyright 2014 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef TILECOMPOSITOR_H +#define TILECOMPOSITOR_H + +#include <aconf.h> + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "SplashTypes.h" + +class GList; +class SplashBitmap; +class DisplayState; +class TileCache; + +//------------------------------------------------------------------------ + +class TileCompositor { +public: + + TileCompositor(DisplayState *stateA, + TileMap *tileMapA, TileCache *tileCacheA); + ~TileCompositor(); + + // Returns the window bitmap. The returned bitmap is owned by the + // TileCompositor object (and may be reused) -- the caller should + // not modify or free it. If <finished> is is non-NULL, *<finished> + // will be set to true if all of the needed tiles are finished, + // i.e., if the returned bitmap is complete. + SplashBitmap *getBitmap(GBool *finished); + + void paperColorChanged(); + void matteColorChanged(); + void selectColorChanged(); + void reverseVideoChanged(); + void docChanged(); + void windowSizeChanged(); + void displayModeChanged(); + void zoomChanged(); + void rotateChanged(); + void scrollPositionChanged(); + void selectionChanged(); + void regionsChanged(); + void optionalContentChanged(); + void forceRedraw(); + +private: + + void clearBitmap(); + void blit(SplashBitmap *srcBitmap, int xSrc, int ySrc, + SplashBitmap *destBitmap, int xDest, int yDest, + int w, int h, GBool compositeWithPaper); + void fill(int xDest, int yDest, int w, int h, + SplashColorPtr color); + void drawSelection(); + void applySelection(int xDest, int yDest, int w, int h, + SplashColorPtr color); + + DisplayState *state; + TileMap *tileMap; + TileCache *tileCache; + + SplashBitmap *bitmap; + GBool bitmapValid; + +}; + +#endif |