node-poppler 5.1.4 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/package.json +10 -10
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Annot.h +0 -1783
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/AnnotStampImageHelper.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Array.h +0 -92
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/BBoxOutputDev.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CMap.h +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CachedFile.h +0 -149
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoFontEngine.h +0 -122
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoOutputDev.h +0 -468
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoRescaleBox.h +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Catalog.h +0 -318
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CertificateInfo.h +0 -129
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharCodeToUnicode.h +0 -143
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharTypes.h +0 -24
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlCachedFile.h +0 -37
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlPDFDocBuilder.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/DateInfo.h +0 -44
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Decrypt.h +0 -147
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Dict.h +0 -126
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Error.h +0 -59
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ErrorCodes.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FDPDFDocBuilder.h +0 -36
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FILECacheLoader.h +0 -34
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FileSpec.h +0 -85
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontEncodingTables.h +0 -20
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontInfo.h +0 -109
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Form.h +0 -734
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Function.h +0 -251
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Gfx.h +0 -373
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxFont.h +0 -466
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState.h +0 -1759
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState_helpers.h +0 -90
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GlobalParams.h +0 -221
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Hints.h +0 -91
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JArithmeticDecoder.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JBIG2Stream.h +0 -130
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JPEG2000Stream.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JSInfo.h +0 -65
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Lexer.h +0 -113
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Linearization.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Link.h +0 -566
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/LocalPDFDocBuilder.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/MarkedContentOutputDev.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Movie.h +0 -123
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToCharCode.h +0 -52
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToUnicodeTable.h +0 -4300
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Object.h +0 -678
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OptionalContent.h +0 -117
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Outline.h +0 -122
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OutputDev.h +0 -379
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDoc.h +0 -419
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocBuilder.h +0 -47
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocEncoding.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocFactory.h +0 -58
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSOutputDev.h +0 -549
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSTokenizer.h +0 -47
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Page.h +0 -273
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PageTransition.h +0 -105
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Parser.h +0 -76
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PopplerCache.h +0 -65
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PreScanOutputDev.h +0 -148
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ProfileData.h +0 -35
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Rendition.h +0 -164
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SecurityHandler.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Sound.h +0 -82
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SplashOutputDev.h +0 -413
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream-CCITT.h +0 -334
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream.h +0 -1504
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructElement.h +0 -406
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructTreeRoot.h +0 -89
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/TextOutputDev.h +0 -918
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UTF.h +0 -112
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCClassTables.h +0 -983
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCompTables.h +0 -328
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeDecompTables.h +0 -7181
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMap.h +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapFuncs.h +0 -35
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapTables.h +0 -84
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeTypeTable.h +0 -49
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ViewerPreferences.h +0 -87
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/XRef.h +0 -325
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-destination.h +0 -69
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-document.h +0 -135
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-embedded-file.h +0 -55
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font-private.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font.h +0 -95
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-global.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-image.h +0 -74
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-renderer.h +0 -77
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-transition.h +0 -85
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page.h +0 -225
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-rectangle.h +0 -66
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-toc.h +0 -72
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-version.h +0 -39
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler_cpp_export.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiBase.h +0 -66
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiEncodings.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiIdentifier.h +0 -52
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiTrueType.h +0 -190
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1.h +0 -70
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1C.h +0 -263
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-action.h +0 -454
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-annot.h +0 -333
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-attachment.h +0 -123
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-date.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-document.h +0 -541
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-enums.h +0 -191
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-features.h +0 -88
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-form-field.h +0 -254
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-layer.h +0 -50
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-macros.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-media.h +0 -80
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-movie.h +0 -81
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-page.h +0 -424
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-structure-element.h +0 -425
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler.h +0 -259
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooCheckedOps.h +0 -116
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooLikely.h +0 -22
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooString.h +0 -262
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooTimer.h +0 -59
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/ImgWriter.h +0 -39
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/JpegWriter.h +0 -69
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/PNGWriter.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/TiffWriter.h +0 -70
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gdir.h +0 -96
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gfile.h +0 -156
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gmem.h +0 -201
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/grandom.h +0 -21
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gstrtod.h +0 -45
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler-config.h +0 -155
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler_private_export.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/Splash.h +0 -336
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashBitmap.h +0 -127
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashClip.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashErrorCodes.h +0 -50
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFont.h +0 -71
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontEngine.h +0 -72
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontFile.h +0 -64
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFont.h +0 -116
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontEngine.h +0 -89
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFile.h +0 -98
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFileID.h +0 -40
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashGlyphBitmap.h +0 -23
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashMath.h +0 -215
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPath.h +0 -138
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPattern.h +0 -107
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashScreen.h +0 -87
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashState.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashTypes.h +0 -248
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPath.h +0 -95
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPathScanner.h +0 -136
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-cpp.pc +0 -12
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-glib.pc +0 -12
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler.pc +0 -10
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-cpp.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-glib.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfattach.1 +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfdetach.1 +0 -94
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdffonts.1 +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfimages.1 +0 -265
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfinfo.1 +0 -198
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfseparate.1 +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftocairo.1 +0 -346
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftohtml.1 +0 -118
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftoppm.1 +0 -230
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftops.1 +0 -267
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftotext.1 +0 -157
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfunite.1 +0 -43
- package/src/lib/win32/poppler-22.04.0/share/poppler/CMakeLists.txt +0 -309
- package/src/lib/win32/poppler-22.04.0/share/poppler/Makefile +0 -333
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
//========================================================================
|
|
2
|
-
//
|
|
3
|
-
// CairoOutputDev.h
|
|
4
|
-
//
|
|
5
|
-
// Copyright 2003 Glyph & Cog, LLC
|
|
6
|
-
// Copyright 2004 Red Hat, INC
|
|
7
|
-
//
|
|
8
|
-
//========================================================================
|
|
9
|
-
|
|
10
|
-
//========================================================================
|
|
11
|
-
//
|
|
12
|
-
// Modified under the Poppler project - http://poppler.freedesktop.org
|
|
13
|
-
//
|
|
14
|
-
// All changes made under the Poppler project to this file are licensed
|
|
15
|
-
// under GPL version 2 or later
|
|
16
|
-
//
|
|
17
|
-
// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
|
|
18
|
-
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
|
|
19
|
-
// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
|
|
20
|
-
// Copyright (C) 2006-2011, 2013 Carlos Garcia Campos <carlosgc@gnome.org>
|
|
21
|
-
// Copyright (C) 2008, 2009, 2011-2017 Adrian Johnson <ajohnson@redneon.com>
|
|
22
|
-
// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
|
|
23
|
-
// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
|
|
24
|
-
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
|
25
|
-
// Copyright (C) 2016 Jason Crain <jason@aquaticape.us>
|
|
26
|
-
// Copyright (C) 2018, 2019, 2021 Albert Astals Cid <aacid@kde.org>
|
|
27
|
-
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
|
|
28
|
-
// Copyright (C) 2020 Michal <sudolskym@gmail.com>
|
|
29
|
-
// Copyright (C) 2021 Christian Persch <chpe@src.gnome.org>
|
|
30
|
-
//
|
|
31
|
-
// To see a description of the changes please see the Changelog file that
|
|
32
|
-
// came with your tarball or type make ChangeLog if you are building from git
|
|
33
|
-
//
|
|
34
|
-
//========================================================================
|
|
35
|
-
|
|
36
|
-
#ifndef CAIROOUTPUTDEV_H
|
|
37
|
-
#define CAIROOUTPUTDEV_H
|
|
38
|
-
|
|
39
|
-
#include <cairo-ft.h>
|
|
40
|
-
#include "OutputDev.h"
|
|
41
|
-
#include "TextOutputDev.h"
|
|
42
|
-
#include "GfxState.h"
|
|
43
|
-
|
|
44
|
-
class PDFDoc;
|
|
45
|
-
class GfxState;
|
|
46
|
-
class GfxPath;
|
|
47
|
-
class Gfx8BitFont;
|
|
48
|
-
struct GfxRGB;
|
|
49
|
-
class CairoFontEngine;
|
|
50
|
-
class CairoFont;
|
|
51
|
-
|
|
52
|
-
//------------------------------------------------------------------------
|
|
53
|
-
|
|
54
|
-
//------------------------------------------------------------------------
|
|
55
|
-
// CairoImage
|
|
56
|
-
//------------------------------------------------------------------------
|
|
57
|
-
class CairoImage
|
|
58
|
-
{
|
|
59
|
-
public:
|
|
60
|
-
// Constructor.
|
|
61
|
-
CairoImage(double x1, double y1, double x2, double y2);
|
|
62
|
-
|
|
63
|
-
// Destructor.
|
|
64
|
-
~CairoImage();
|
|
65
|
-
|
|
66
|
-
CairoImage(const CairoImage &) = delete;
|
|
67
|
-
CairoImage &operator=(const CairoImage &) = delete;
|
|
68
|
-
|
|
69
|
-
// Set the image cairo surface
|
|
70
|
-
void setImage(cairo_surface_t *image);
|
|
71
|
-
|
|
72
|
-
// Get the image cairo surface
|
|
73
|
-
cairo_surface_t *getImage() const { return image; }
|
|
74
|
-
|
|
75
|
-
// Get the image rectangle
|
|
76
|
-
void getRect(double *xa1, double *ya1, double *xa2, double *ya2)
|
|
77
|
-
{
|
|
78
|
-
*xa1 = x1;
|
|
79
|
-
*ya1 = y1;
|
|
80
|
-
*xa2 = x2;
|
|
81
|
-
*ya2 = y2;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
private:
|
|
85
|
-
cairo_surface_t *image; // image cairo surface
|
|
86
|
-
double x1, y1; // upper left corner
|
|
87
|
-
double x2, y2; // lower right corner
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
//------------------------------------------------------------------------
|
|
91
|
-
// CairoOutputDev
|
|
92
|
-
//------------------------------------------------------------------------
|
|
93
|
-
|
|
94
|
-
class CairoOutputDev : public OutputDev
|
|
95
|
-
{
|
|
96
|
-
public:
|
|
97
|
-
// Constructor.
|
|
98
|
-
CairoOutputDev();
|
|
99
|
-
|
|
100
|
-
// Destructor.
|
|
101
|
-
~CairoOutputDev() override;
|
|
102
|
-
|
|
103
|
-
//----- get info about output device
|
|
104
|
-
|
|
105
|
-
// Does this device use upside-down coordinates?
|
|
106
|
-
// (Upside-down means (0,0) is the top left corner of the page.)
|
|
107
|
-
bool upsideDown() override { return true; }
|
|
108
|
-
|
|
109
|
-
// Does this device use drawChar() or drawString()?
|
|
110
|
-
bool useDrawChar() override { return true; }
|
|
111
|
-
|
|
112
|
-
// Does this device use tilingPatternFill()? If this returns false,
|
|
113
|
-
// tiling pattern fills will be reduced to a series of other drawing
|
|
114
|
-
// operations.
|
|
115
|
-
bool useTilingPatternFill() override { return true; }
|
|
116
|
-
|
|
117
|
-
// Does this device use functionShadedFill(), axialShadedFill(), and
|
|
118
|
-
// radialShadedFill()? If this returns false, these shaded fills
|
|
119
|
-
// will be reduced to a series of other drawing operations.
|
|
120
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
|
|
121
|
-
bool useShadedFills(int type) override { return type <= 7; }
|
|
122
|
-
#else
|
|
123
|
-
bool useShadedFills(int type) override { return type > 1 && type < 4; }
|
|
124
|
-
#endif
|
|
125
|
-
|
|
126
|
-
// Does this device use FillColorStop()?
|
|
127
|
-
bool useFillColorStop() override { return true; }
|
|
128
|
-
|
|
129
|
-
// Does this device use beginType3Char/endType3Char? Otherwise,
|
|
130
|
-
// text in Type 3 fonts will be drawn with drawChar/drawString.
|
|
131
|
-
bool interpretType3Chars() override { return false; }
|
|
132
|
-
|
|
133
|
-
// Does this device need to clip pages to the crop box even when the
|
|
134
|
-
// box is the crop box?
|
|
135
|
-
bool needClipToCropBox() override { return true; }
|
|
136
|
-
|
|
137
|
-
//----- initialization and control
|
|
138
|
-
|
|
139
|
-
// Start a page.
|
|
140
|
-
void startPage(int pageNum, GfxState *state, XRef *xref) override;
|
|
141
|
-
|
|
142
|
-
// End a page.
|
|
143
|
-
void endPage() override;
|
|
144
|
-
|
|
145
|
-
//----- save/restore graphics state
|
|
146
|
-
void saveState(GfxState *state) override;
|
|
147
|
-
void restoreState(GfxState *state) override;
|
|
148
|
-
|
|
149
|
-
//----- update graphics state
|
|
150
|
-
void updateAll(GfxState *state) override;
|
|
151
|
-
void setDefaultCTM(const double *ctm) override;
|
|
152
|
-
void updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) override;
|
|
153
|
-
void updateLineDash(GfxState *state) override;
|
|
154
|
-
void updateFlatness(GfxState *state) override;
|
|
155
|
-
void updateLineJoin(GfxState *state) override;
|
|
156
|
-
void updateLineCap(GfxState *state) override;
|
|
157
|
-
void updateMiterLimit(GfxState *state) override;
|
|
158
|
-
void updateLineWidth(GfxState *state) override;
|
|
159
|
-
void updateFillColor(GfxState *state) override;
|
|
160
|
-
void updateStrokeColor(GfxState *state) override;
|
|
161
|
-
void updateFillOpacity(GfxState *state) override;
|
|
162
|
-
void updateStrokeOpacity(GfxState *state) override;
|
|
163
|
-
void updateFillColorStop(GfxState *state, double offset) override;
|
|
164
|
-
void updateBlendMode(GfxState *state) override;
|
|
165
|
-
|
|
166
|
-
//----- update text state
|
|
167
|
-
void updateFont(GfxState *state) override;
|
|
168
|
-
|
|
169
|
-
//----- path painting
|
|
170
|
-
void stroke(GfxState *state) override;
|
|
171
|
-
void fill(GfxState *state) override;
|
|
172
|
-
void eoFill(GfxState *state) override;
|
|
173
|
-
void clipToStrokePath(GfxState *state) override;
|
|
174
|
-
bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
|
|
175
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
|
|
176
|
-
bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
|
|
177
|
-
#endif
|
|
178
|
-
bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override;
|
|
179
|
-
bool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) override;
|
|
180
|
-
bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override;
|
|
181
|
-
bool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) override;
|
|
182
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
|
|
183
|
-
bool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) override;
|
|
184
|
-
bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override;
|
|
185
|
-
#endif
|
|
186
|
-
|
|
187
|
-
//----- path clipping
|
|
188
|
-
void clip(GfxState *state) override;
|
|
189
|
-
void eoClip(GfxState *state) override;
|
|
190
|
-
|
|
191
|
-
//----- text drawing
|
|
192
|
-
void beginString(GfxState *state, const GooString *s) override;
|
|
193
|
-
void endString(GfxState *state) override;
|
|
194
|
-
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;
|
|
195
|
-
void beginActualText(GfxState *state, const GooString *text) override;
|
|
196
|
-
void endActualText(GfxState *state) override;
|
|
197
|
-
|
|
198
|
-
bool beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, const Unicode *u, int uLen) override;
|
|
199
|
-
void endType3Char(GfxState *state) override;
|
|
200
|
-
void beginTextObject(GfxState *state) override;
|
|
201
|
-
void endTextObject(GfxState *state) override;
|
|
202
|
-
|
|
203
|
-
//----- image drawing
|
|
204
|
-
void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
|
|
205
|
-
void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool inlineImg, double *baseMatrix) override;
|
|
206
|
-
void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override;
|
|
207
|
-
void drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg);
|
|
208
|
-
void drawImageMaskRegular(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg);
|
|
209
|
-
|
|
210
|
-
void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
|
|
211
|
-
void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap,
|
|
212
|
-
bool maskInterpolate) override;
|
|
213
|
-
|
|
214
|
-
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;
|
|
215
|
-
|
|
216
|
-
//----- transparency groups and soft masks
|
|
217
|
-
void beginTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) override;
|
|
218
|
-
void endTransparencyGroup(GfxState * /*state*/) override;
|
|
219
|
-
void popTransparencyGroup();
|
|
220
|
-
void paintTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/) override;
|
|
221
|
-
void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override;
|
|
222
|
-
void clearSoftMask(GfxState * /*state*/) override;
|
|
223
|
-
|
|
224
|
-
//----- Type 3 font operators
|
|
225
|
-
void type3D0(GfxState *state, double wx, double wy) override;
|
|
226
|
-
void type3D1(GfxState *state, double wx, double wy, double llx, double lly, double urx, double ury) override;
|
|
227
|
-
|
|
228
|
-
//----- special access
|
|
229
|
-
|
|
230
|
-
// Called to indicate that a new PDF document has been loaded.
|
|
231
|
-
void startDoc(PDFDoc *docA, CairoFontEngine *fontEngine = nullptr);
|
|
232
|
-
|
|
233
|
-
bool isReverseVideo() { return false; }
|
|
234
|
-
|
|
235
|
-
void setCairo(cairo_t *cr);
|
|
236
|
-
void setTextPage(TextPage *text);
|
|
237
|
-
void setPrinting(bool printingA)
|
|
238
|
-
{
|
|
239
|
-
printing = printingA;
|
|
240
|
-
needFontUpdate = true;
|
|
241
|
-
}
|
|
242
|
-
void copyAntialias(cairo_t *cr, cairo_t *source_cr);
|
|
243
|
-
|
|
244
|
-
void setInType3Char(bool inType3CharA) { inType3Char = inType3CharA; }
|
|
245
|
-
void getType3GlyphWidth(double *wx, double *wy)
|
|
246
|
-
{
|
|
247
|
-
*wx = t3_glyph_wx;
|
|
248
|
-
*wy = t3_glyph_wy;
|
|
249
|
-
}
|
|
250
|
-
bool hasType3GlyphBBox() { return t3_glyph_has_bbox; }
|
|
251
|
-
double *getType3GlyphBBox() { return t3_glyph_bbox; }
|
|
252
|
-
|
|
253
|
-
protected:
|
|
254
|
-
void doPath(cairo_t *cairo, GfxState *state, const GfxPath *path);
|
|
255
|
-
cairo_surface_t *downscaleSurface(cairo_surface_t *orig_surface);
|
|
256
|
-
void getScaledSize(const cairo_matrix_t *matrix, int orig_width, int orig_height, int *scaledWidth, int *scaledHeight);
|
|
257
|
-
cairo_filter_t getFilterForSurface(cairo_surface_t *image, bool interpolate);
|
|
258
|
-
bool getStreamData(Stream *str, char **buffer, int *length);
|
|
259
|
-
void setMimeData(GfxState *state, Stream *str, Object *ref, GfxImageColorMap *colorMap, cairo_surface_t *image, int height);
|
|
260
|
-
void fillToStrokePathClip(GfxState *state);
|
|
261
|
-
void alignStrokeCoords(const GfxSubpath *subpath, int i, double *x, double *y);
|
|
262
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
|
|
263
|
-
bool setMimeDataForJBIG2Globals(Stream *str, cairo_surface_t *image);
|
|
264
|
-
#endif
|
|
265
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 15, 10)
|
|
266
|
-
bool setMimeDataForCCITTParams(Stream *str, cairo_surface_t *image, int height);
|
|
267
|
-
#endif
|
|
268
|
-
|
|
269
|
-
GfxRGB fill_color, stroke_color;
|
|
270
|
-
cairo_pattern_t *fill_pattern, *stroke_pattern;
|
|
271
|
-
double fill_opacity;
|
|
272
|
-
double stroke_opacity;
|
|
273
|
-
bool stroke_adjust;
|
|
274
|
-
bool adjusted_stroke_width;
|
|
275
|
-
bool align_stroke_coords;
|
|
276
|
-
CairoFont *currentFont;
|
|
277
|
-
XRef *xref;
|
|
278
|
-
|
|
279
|
-
struct StrokePathClip
|
|
280
|
-
{
|
|
281
|
-
GfxPath *path;
|
|
282
|
-
cairo_matrix_t ctm;
|
|
283
|
-
double line_width;
|
|
284
|
-
double *dashes;
|
|
285
|
-
int dash_count;
|
|
286
|
-
double dash_offset;
|
|
287
|
-
cairo_line_cap_t cap;
|
|
288
|
-
cairo_line_join_t join;
|
|
289
|
-
double miter;
|
|
290
|
-
int ref_count;
|
|
291
|
-
} * strokePathClip;
|
|
292
|
-
|
|
293
|
-
PDFDoc *doc; // the current document
|
|
294
|
-
|
|
295
|
-
static FT_Library ft_lib;
|
|
296
|
-
static std::once_flag ft_lib_once_flag;
|
|
297
|
-
|
|
298
|
-
CairoFontEngine *fontEngine;
|
|
299
|
-
bool fontEngine_owner;
|
|
300
|
-
|
|
301
|
-
cairo_t *cairo;
|
|
302
|
-
cairo_matrix_t orig_matrix;
|
|
303
|
-
bool needFontUpdate; // set when the font needs to be updated
|
|
304
|
-
bool printing;
|
|
305
|
-
bool use_show_text_glyphs;
|
|
306
|
-
bool text_matrix_valid;
|
|
307
|
-
cairo_glyph_t *glyphs;
|
|
308
|
-
int glyphCount;
|
|
309
|
-
cairo_text_cluster_t *clusters;
|
|
310
|
-
int clusterCount;
|
|
311
|
-
char *utf8;
|
|
312
|
-
int utf8Count;
|
|
313
|
-
int utf8Max;
|
|
314
|
-
cairo_path_t *textClipPath;
|
|
315
|
-
bool inUncoloredPattern; // inside a uncolored pattern (PaintType = 2)
|
|
316
|
-
bool inType3Char; // inside a Type 3 CharProc
|
|
317
|
-
double t3_glyph_wx, t3_glyph_wy;
|
|
318
|
-
bool t3_glyph_has_bbox;
|
|
319
|
-
double t3_glyph_bbox[4];
|
|
320
|
-
bool prescaleImages;
|
|
321
|
-
|
|
322
|
-
TextPage *textPage; // text for the current page
|
|
323
|
-
ActualText *actualText;
|
|
324
|
-
|
|
325
|
-
cairo_pattern_t *group;
|
|
326
|
-
cairo_pattern_t *shape;
|
|
327
|
-
cairo_pattern_t *mask;
|
|
328
|
-
cairo_matrix_t mask_matrix;
|
|
329
|
-
cairo_t *cairo_shape;
|
|
330
|
-
int knockoutCount;
|
|
331
|
-
struct ColorSpaceStack
|
|
332
|
-
{
|
|
333
|
-
bool knockout;
|
|
334
|
-
GfxColorSpace *cs;
|
|
335
|
-
cairo_matrix_t group_matrix;
|
|
336
|
-
struct ColorSpaceStack *next;
|
|
337
|
-
} * groupColorSpaceStack;
|
|
338
|
-
|
|
339
|
-
struct MaskStack
|
|
340
|
-
{
|
|
341
|
-
cairo_pattern_t *mask;
|
|
342
|
-
cairo_matrix_t mask_matrix;
|
|
343
|
-
struct MaskStack *next;
|
|
344
|
-
} * maskStack;
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
//------------------------------------------------------------------------
|
|
348
|
-
// CairoImageOutputDev
|
|
349
|
-
//------------------------------------------------------------------------
|
|
350
|
-
|
|
351
|
-
// XXX: this should ideally not inherit from CairoOutputDev but use it instead perhaps
|
|
352
|
-
class CairoImageOutputDev : public CairoOutputDev
|
|
353
|
-
{
|
|
354
|
-
public:
|
|
355
|
-
// Constructor.
|
|
356
|
-
CairoImageOutputDev();
|
|
357
|
-
|
|
358
|
-
// Destructor.
|
|
359
|
-
~CairoImageOutputDev() override;
|
|
360
|
-
|
|
361
|
-
//----- get info about output device
|
|
362
|
-
|
|
363
|
-
// Does this device use upside-down coordinates?
|
|
364
|
-
// (Upside-down means (0,0) is the top left corner of the page.)
|
|
365
|
-
bool upsideDown() override { return true; }
|
|
366
|
-
|
|
367
|
-
// Does this device use drawChar() or drawString()?
|
|
368
|
-
bool useDrawChar() override { return false; }
|
|
369
|
-
|
|
370
|
-
// Does this device use tilingPatternFill()? If this returns false,
|
|
371
|
-
// tiling pattern fills will be reduced to a series of other drawing
|
|
372
|
-
// operations.
|
|
373
|
-
bool useTilingPatternFill() override { return true; }
|
|
374
|
-
|
|
375
|
-
// Does this device use functionShadedFill(), axialShadedFill(), and
|
|
376
|
-
// radialShadedFill()? If this returns false, these shaded fills
|
|
377
|
-
// will be reduced to a series of other drawing operations.
|
|
378
|
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
|
|
379
|
-
bool useShadedFills(int type) override { return type <= 7; }
|
|
380
|
-
#else
|
|
381
|
-
bool useShadedFills(int type) override { return type < 4; }
|
|
382
|
-
#endif
|
|
383
|
-
|
|
384
|
-
// Does this device use FillColorStop()?
|
|
385
|
-
bool useFillColorStop() override { return false; }
|
|
386
|
-
|
|
387
|
-
// Does this device use beginType3Char/endType3Char? Otherwise,
|
|
388
|
-
// text in Type 3 fonts will be drawn with drawChar/drawString.
|
|
389
|
-
bool interpretType3Chars() override { return false; }
|
|
390
|
-
|
|
391
|
-
// Does this device need non-text content?
|
|
392
|
-
bool needNonText() override { return true; }
|
|
393
|
-
|
|
394
|
-
//----- save/restore graphics state
|
|
395
|
-
void saveState(GfxState *state) override { }
|
|
396
|
-
void restoreState(GfxState *state) override { }
|
|
397
|
-
|
|
398
|
-
//----- update graphics state
|
|
399
|
-
void updateAll(GfxState *state) override { }
|
|
400
|
-
void setDefaultCTM(const double *ctm) override { }
|
|
401
|
-
void updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) override { }
|
|
402
|
-
void updateLineDash(GfxState *state) override { }
|
|
403
|
-
void updateFlatness(GfxState *state) override { }
|
|
404
|
-
void updateLineJoin(GfxState *state) override { }
|
|
405
|
-
void updateLineCap(GfxState *state) override { }
|
|
406
|
-
void updateMiterLimit(GfxState *state) override { }
|
|
407
|
-
void updateLineWidth(GfxState *state) override { }
|
|
408
|
-
void updateFillColor(GfxState *state) override { }
|
|
409
|
-
void updateStrokeColor(GfxState *state) override { }
|
|
410
|
-
void updateFillOpacity(GfxState *state) override { }
|
|
411
|
-
void updateStrokeOpacity(GfxState *state) override { }
|
|
412
|
-
void updateBlendMode(GfxState *state) override { }
|
|
413
|
-
|
|
414
|
-
//----- update text state
|
|
415
|
-
void updateFont(GfxState *state) override { }
|
|
416
|
-
|
|
417
|
-
//----- path painting
|
|
418
|
-
void stroke(GfxState *state) override { }
|
|
419
|
-
void fill(GfxState *state) override { }
|
|
420
|
-
void eoFill(GfxState *state) override { }
|
|
421
|
-
void clipToStrokePath(GfxState *state) override { }
|
|
422
|
-
bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override { return true; }
|
|
423
|
-
bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) override { return true; }
|
|
424
|
-
bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) override { return true; }
|
|
425
|
-
|
|
426
|
-
//----- path clipping
|
|
427
|
-
void clip(GfxState *state) override { }
|
|
428
|
-
void eoClip(GfxState *state) override { }
|
|
429
|
-
|
|
430
|
-
//----- image drawing
|
|
431
|
-
void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
|
|
432
|
-
void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
|
|
433
|
-
void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap,
|
|
434
|
-
bool maskInterpolate) override;
|
|
435
|
-
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;
|
|
436
|
-
void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool inlineImg, double *baseMatrix) override;
|
|
437
|
-
void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override { }
|
|
438
|
-
|
|
439
|
-
//----- transparency groups and soft masks
|
|
440
|
-
void beginTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/, GfxColorSpace * /*blendingColorSpace*/, bool /*isolated*/, bool /*knockout*/, bool /*forSoftMask*/) override { }
|
|
441
|
-
void endTransparencyGroup(GfxState * /*state*/) override { }
|
|
442
|
-
void paintTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/) override { }
|
|
443
|
-
void setSoftMask(GfxState * /*state*/, const double * /*bbox*/, bool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/) override { }
|
|
444
|
-
void clearSoftMask(GfxState * /*state*/) override { }
|
|
445
|
-
|
|
446
|
-
//----- Image list
|
|
447
|
-
// By default images are not rendred
|
|
448
|
-
void setImageDrawDecideCbk(bool (*cbk)(int img_id, void *data), void *data)
|
|
449
|
-
{
|
|
450
|
-
imgDrawCbk = cbk;
|
|
451
|
-
imgDrawCbkData = data;
|
|
452
|
-
}
|
|
453
|
-
// Iterate through list of images.
|
|
454
|
-
int getNumImages() const { return numImages; }
|
|
455
|
-
CairoImage *getImage(int i) const { return images[i]; }
|
|
456
|
-
|
|
457
|
-
private:
|
|
458
|
-
void saveImage(CairoImage *image);
|
|
459
|
-
void getBBox(GfxState *state, int width, int height, double *x1, double *y1, double *x2, double *y2);
|
|
460
|
-
|
|
461
|
-
CairoImage **images;
|
|
462
|
-
int numImages;
|
|
463
|
-
int size;
|
|
464
|
-
bool (*imgDrawCbk)(int img_id, void *data);
|
|
465
|
-
void *imgDrawCbkData;
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
#endif
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © 2009 Mozilla Corporation
|
|
3
|
-
*
|
|
4
|
-
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
5
|
-
* documentation for any purpose is hereby granted without fee, provided that
|
|
6
|
-
* the above copyright notice appear in all copies and that both that
|
|
7
|
-
* copyright notice and this permission notice appear in supporting
|
|
8
|
-
* documentation, and that the name of Mozilla Corporation not be used in
|
|
9
|
-
* advertising or publicity pertaining to distribution of the software without
|
|
10
|
-
* specific, written prior permission. Mozilla Corporation makes no
|
|
11
|
-
* representations about the suitability of this software for any purpose. It
|
|
12
|
-
* is provided "as is" without express or implied warranty.
|
|
13
|
-
*
|
|
14
|
-
* MOZILLA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
15
|
-
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
|
|
16
|
-
* SHALL MOZILLA CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
17
|
-
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
18
|
-
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
19
|
-
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
20
|
-
* OF THIS SOFTWARE.
|
|
21
|
-
*
|
|
22
|
-
* Author: Jeff Muizelaar, Mozilla Corp.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
//========================================================================
|
|
26
|
-
//
|
|
27
|
-
// Modified under the Poppler project - http://poppler.freedesktop.org
|
|
28
|
-
//
|
|
29
|
-
// All changes made under the Poppler project to this file are licensed
|
|
30
|
-
// under GPL version 2 or later
|
|
31
|
-
//
|
|
32
|
-
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
|
|
33
|
-
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
|
|
34
|
-
//
|
|
35
|
-
// To see a description of the changes please see the Changelog file that
|
|
36
|
-
// came with your tarball or type make ChangeLog if you are building from git
|
|
37
|
-
//
|
|
38
|
-
//========================================================================
|
|
39
|
-
|
|
40
|
-
#ifndef CAIRO_RESCALE_BOX_H
|
|
41
|
-
#define CAIRO_RESCALE_BOX_H
|
|
42
|
-
|
|
43
|
-
#include <cairo.h>
|
|
44
|
-
|
|
45
|
-
class CairoRescaleBox
|
|
46
|
-
{
|
|
47
|
-
public:
|
|
48
|
-
CairoRescaleBox() {};
|
|
49
|
-
virtual ~CairoRescaleBox() {};
|
|
50
|
-
|
|
51
|
-
CairoRescaleBox(const CairoRescaleBox &) = delete;
|
|
52
|
-
CairoRescaleBox &operator=(const CairoRescaleBox &) = delete;
|
|
53
|
-
|
|
54
|
-
virtual bool downScaleImage(unsigned orig_width, unsigned orig_height, signed scaled_width, signed scaled_height, unsigned short int start_column, unsigned short int start_row, unsigned short int width, unsigned short int height,
|
|
55
|
-
cairo_surface_t *dest_surface);
|
|
56
|
-
|
|
57
|
-
virtual void getRow(int row_num, uint32_t *row_data) = 0;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
#endif /* CAIRO_RESCALE_BOX_H */
|