1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-09-19 05:40:07 +00:00
pdf2htmlEX/3rdparty/poppler/git/CairoRescaleBox.h
Trent Petersen 9ed21007e5
New master (#2)
* Show header in font map files

* fix a usage of unique_ptr with array

* Added '--quiet' argument to hide progress messages (resolves #503)

* Revert cout messages to cerr (see #622)

* bump version

* fix build; fix some coverity warnings

* Many bug fixes and improvements, including:

- Incorporated latest Cairo files from cairo-0.15.2
- Moved build to out-of-source
- Added clean script
- Rewritten correct_text_visibility option to improve accuracy
- Transparent characters drawn on background layer
- Improved bad unicode detection

* Many bug fixes and improvements, including:

- Incorporated latest Cairo files from cairo-0.15.2
- Moved build to out-of-source
- Added clean script
- Rewritten correct_text_visibility option to improve accuracy
- Transparent characters drawn on background layer
- Improved bad unicode detection

* Rationlise DPI to single number.
Implement actual_dpi - clamp maximum background image size in cases of huge PDF pages

* DPI fixes - increase DPI when partially covered text to covered-text-dpi
Add font-style italic for oblique fonts
Reduce char bbox for occlusion tests

* Don't shrink bbox - not required if zoom=25 used

* Ignore occlusion from stroke/fill with opacity < 0.5
Better compute char bbox for occlusion
Use 10% inset for char bbox for occlusion
Back out adding font-weight: bold to potentially bold fonts
Fix bug to ensure CID ascent/descent matches subfont values

* Removed zero char logging

* Remove forced italic - missing italic is due to fontforge bug which needs fixing

* Typos fixed, readme updated

* Typos

* Increase maximum background image width
Fix private use range to avoid stupid mobile safari switching to emoji font

* included -pthread switch to link included 3rdparty poppler files.

* Updated files from poppler 0.59.0 and adjusted includes.

* Support updated "Object" class from poppler 0.59.0
2018-01-10 13:31:38 -06:00

61 lines
2.4 KiB
C++

/*
* Copyright © 2009 Mozilla Corporation
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Mozilla Corporation not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Mozilla Corporation makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* MOZILLA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
* SHALL MOZILLA CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
* Author: Jeff Muizelaar, Mozilla Corp.
*/
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
//
// 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
//
//========================================================================
#ifndef CAIRO_RESCALE_BOX_H
#define CAIRO_RESCALE_BOX_H
#include "goo/gtypes.h"
#include <cairo.h>
class CairoRescaleBox {
public:
CairoRescaleBox() {};
virtual ~CairoRescaleBox() {};
virtual GBool 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,
cairo_surface_t *dest_surface);
virtual void getRow(int row_num, uint32_t *row_data) = 0;
};
#endif /* CAIRO_RESCALE_BOX_H */