File indexing completed on 2025-12-10 10:23:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <PDFDoc.h>
0012 #include <GfxState.h>
0013 #include <OutputDev.h>
0014
0015 class POPPLER_PRIVATE_EXPORT BBoxOutputDev : public OutputDev
0016 {
0017 public:
0018 bool upsideDown() override { return false; }
0019 bool useDrawChar() override { return true; }
0020 bool interpretType3Chars() override { return false; }
0021
0022 BBoxOutputDev();
0023 BBoxOutputDev(bool text, bool vector, bool raster);
0024 BBoxOutputDev(bool text, bool vector, bool raster, bool lwidth);
0025 void endPage() override;
0026 void stroke(GfxState *state) override;
0027 void fill(GfxState *state) override;
0028 void eoFill(GfxState *state) override;
0029 void drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, const Unicode *u, int uLen) override;
0030 void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
0031 void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
0032 void drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert, bool maskInterpolate) override;
0033 void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap,
0034 bool maskInterpolate) override;
0035
0036 double getX1() const;
0037 double getY1() const;
0038 double getX2() const;
0039 double getY2() const;
0040 double getHasGraphics() const;
0041
0042 private:
0043 PDFRectangle bb;
0044 bool hasGraphics;
0045
0046 bool text;
0047 bool vector;
0048 bool raster;
0049 bool lwidth;
0050
0051 void updatePoint(PDFRectangle *bbA, double x, double y, const GfxState *state);
0052 void updatePath(PDFRectangle *bbA, const GfxPath *path, const GfxState *state);
0053 void updateImage(PDFRectangle *bbA, const GfxState *state);
0054 };