2012-10-02 12:41:39 +00:00
|
|
|
/*
|
|
|
|
* Splash Background renderer
|
|
|
|
* Render all those things not supported as Image, with Splash
|
|
|
|
*
|
|
|
|
* by WangLu
|
|
|
|
* 2012.08.06
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-10-02 12:56:40 +00:00
|
|
|
#ifndef SPLASH_BACKGROUND_RENDERER_H__
|
|
|
|
#define SPLASH_BACKGROUND_RENDERER_H__
|
2012-10-02 12:41:39 +00:00
|
|
|
|
|
|
|
#include <splash/SplashBitmap.h>
|
|
|
|
#include <SplashOutputDev.h>
|
|
|
|
|
|
|
|
namespace pdf2htmlEX {
|
|
|
|
|
|
|
|
// Based on BackgroundRenderer from poppler
|
|
|
|
class SplashBackgroundRenderer : public SplashOutputDev
|
|
|
|
{
|
|
|
|
public:
|
2012-10-02 12:56:40 +00:00
|
|
|
static const SplashColor white;
|
|
|
|
|
2012-10-02 12:41:39 +00:00
|
|
|
SplashBackgroundRenderer()
|
2012-10-02 12:56:40 +00:00
|
|
|
: SplashOutputDev(splashModeRGB8, 4, gFalse, (SplashColorPtr)&white, gTrue, gTrue)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ~SplashBackgroundRenderer() { }
|
2012-10-02 12:41:39 +00:00
|
|
|
|
|
|
|
virtual void drawChar(GfxState *state, double x, double y,
|
|
|
|
double dx, double dy,
|
|
|
|
double originX, double originY,
|
|
|
|
CharCode code, int nBytes, Unicode *u, int uLen);
|
|
|
|
};
|
|
|
|
|
2012-10-02 12:56:40 +00:00
|
|
|
} // namespace pdf2htmlEX
|
2012-10-02 12:41:39 +00:00
|
|
|
|
2012-10-02 12:56:40 +00:00
|
|
|
#endif // SPLASH_BACKGROUND_RENDERER_H__
|