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
45class CairoRescaleBox
46{
47public:
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 */
61

source code of poppler/poppler/CairoRescaleBox.h