1 //======================================================================== 2 // 3 // TileCompositor.h 4 // 5 // Copyright 2014 Glyph & Cog, LLC 6 // 7 //======================================================================== 8 9 #ifndef TILECOMPOSITOR_H 10 #define TILECOMPOSITOR_H 11 12 #include <aconf.h> 13 14 #ifdef USE_GCC_PRAGMAS 15 #pragma interface 16 #endif 17 18 #include "SplashTypes.h" 19 20 class GList; 21 class SplashBitmap; 22 class DisplayState; 23 class TileCache; 24 25 //------------------------------------------------------------------------ 26 27 class TileCompositor { 28 public: 29 30 TileCompositor(DisplayState *stateA, 31 TileMap *tileMapA, TileCache *tileCacheA); 32 ~TileCompositor(); 33 34 // Returns the window bitmap. The returned bitmap is owned by the 35 // TileCompositor object (and may be reused) -- the caller should 36 // not modify or free it. If <finished> is is non-NULL, *<finished> 37 // will be set to true if all of the needed tiles are finished, 38 // i.e., if the returned bitmap is complete. 39 SplashBitmap *getBitmap(GBool *finished); 40 41 void paperColorChanged(); 42 void matteColorChanged(); 43 void selectColorChanged(); 44 void reverseVideoChanged(); 45 void docChanged(); 46 void windowSizeChanged(); 47 void displayModeChanged(); 48 void zoomChanged(); 49 void rotateChanged(); 50 void scrollPositionChanged(); 51 void selectionChanged(); 52 void regionsChanged(); 53 void optionalContentChanged(); 54 void forceRedraw(); 55 56 private: 57 58 void clearBitmap(); 59 void blit(SplashBitmap *srcBitmap, int xSrc, int ySrc, 60 SplashBitmap *destBitmap, int xDest, int yDest, 61 int w, int h, GBool compositeWithPaper); 62 void fill(int xDest, int yDest, int w, int h, 63 SplashColorPtr color); 64 void drawSelection(); 65 void applySelection(int xDest, int yDest, int w, int h, 66 SplashColorPtr color); 67 68 DisplayState *state; 69 TileMap *tileMap; 70 TileCache *tileCache; 71 72 SplashBitmap *bitmap; 73 GBool bitmapValid; 74 75 }; 76 77 #endif 78