Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
poppler 21.04.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed May 3, 2021
1 parent be21f0d commit 16ff490
Show file tree
Hide file tree
Showing 438 changed files with 83,952 additions and 35,694 deletions.
2,363 changes: 1,204 additions & 1,159 deletions include/poppler/Annot.h

Large diffs are not rendered by default.

65 changes: 34 additions & 31 deletions include/poppler/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
// Copyright (C) 2005 Kristian Høgsberg <[email protected]>
// Copyright (C) 2012 Fabio D'Urso <[email protected]>
// Copyright (C) 2013 Thomas Freitag <[email protected]>
// Copyright (C) 2017, 2018 Albert Astals Cid <[email protected]>
// Copyright (C) 2017-2019 Albert Astals Cid <[email protected]>
// Copyright (C) 2017 Adrian Johnson <[email protected]>
// Copyright (C) 2018 Adam Reichold <[email protected]>
// Copyright (C) 2018, 2019 Adam Reichold <[email protected]>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
Expand All @@ -33,6 +33,7 @@
#include <vector>

#include "poppler-config.h"
#include "poppler_private_export.h"
#include "Object.h"

class XRef;
Expand All @@ -41,47 +42,49 @@ class XRef;
// Array
//------------------------------------------------------------------------

class Array {
class POPPLER_PRIVATE_EXPORT Array
{
public:
// Constructor.
Array(XRef *xrefA);

// Constructor.
Array(XRef *xrefA);
// Destructor.
~Array();

// Destructor.
~Array();
Array(const Array &) = delete;
Array &operator=(const Array &) = delete;

Array(const Array &) = delete;
Array& operator=(const Array &) = delete;
// Get number of elements.
int getLength() const { return elems.size(); }

// Get number of elements.
int getLength() const { return elems.size(); }
// Copy array with new xref
Array *copy(XRef *xrefA) const;

// Copy array with new xref
Object copy(XRef *xrefA) const;
// Add an element
// elem becomes a dead object after this call
void add(Object &&elem);

// Add an element
// elem becomes a dead object after this call
void add(Object &&elem);
// Remove an element by position
void remove(int i);

// Remove an element by position
void remove(int i);

// Accessors.
Object get(int i, int recursion = 0) const;
Object getNF(int i) const;
bool getString(int i, GooString *string) const;
// Accessors.
Object get(int i, int recursion = 0) const;
// Same as above but if the returned object is a fetched Ref returns such Ref in returnRef, otherwise returnRef is Ref::INVALID()
Object get(int i, Ref *returnRef, int recursion = 0) const;
const Object &getNF(int i) const;
bool getString(int i, GooString *string) const;

private:
friend class Object; // for incRef/decRef
friend class Object; // for incRef/decRef

// Reference counting.
int incRef() { return ++ref; }
int decRef() { return --ref; }
// Reference counting.
int incRef() { return ++ref; }
int decRef() { return --ref; }

XRef *xref; // the xref table for this PDF file
std::vector<Object> elems; // array of elements
std::atomic_int ref; // reference count
mutable std::recursive_mutex mutex;
XRef *xref; // the xref table for this PDF file
std::vector<Object> elems; // array of elements
std::atomic_int ref; // reference count
mutable std::recursive_mutex mutex;
};

#endif
54 changes: 54 additions & 0 deletions include/poppler/BBoxOutputDev.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//========================================================================
//
// BBoxOutputDev.cc
//
// This file is licensed under the GPLv2 or later
//
// Copyright 2020 sgerwk <[email protected]>
//
//========================================================================

#include <PDFDoc.h>
#include <GfxState.h>
#include <OutputDev.h>

class POPPLER_PRIVATE_EXPORT BBoxOutputDev : public OutputDev
{
public:
bool upsideDown() override { return false; }
bool useDrawChar() override { return true; }
bool interpretType3Chars() override { return false; }

BBoxOutputDev();
BBoxOutputDev(bool text, bool vector, bool raster);
BBoxOutputDev(bool text, bool vector, bool raster, bool lwidth);
void endPage() override;
void stroke(GfxState *state) override;
void fill(GfxState *state) override;
void eoFill(GfxState *state) override;
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;
void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
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;
void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap,
bool maskInterpolate) override;

double getX1() const;
double getY1() const;
double getX2() const;
double getY2() const;
double getHasGraphics() const;

private:
PDFRectangle bb;
bool hasGraphics;

bool text;
bool vector;
bool raster;
bool lwidth;

void updatePoint(PDFRectangle *bbA, double x, double y, const GfxState *state);
void updatePath(PDFRectangle *bbA, const GfxPath *path, const GfxState *state);
void updateImage(PDFRectangle *bbA, const GfxState *state);
};
67 changes: 0 additions & 67 deletions include/poppler/BuiltinFont.h

This file was deleted.

23 changes: 0 additions & 23 deletions include/poppler/BuiltinFontTables.h

This file was deleted.

Loading

0 comments on commit 16ff490

Please sign in to comment.