"Fossies" - the Fresh Open Source Software Archive

Member "poppler-0.82.0/cpp/poppler-page-renderer.h" (25 Oct 2019, 2161 Bytes) of package /linux/misc/poppler-0.82.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "poppler-page-renderer.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) 2010, Pino Toscano <pino@kde.org>
    3  * Copyright (C) 2018, Zsombor Hollay-Horvath <hollay.horvath@gmail.com>
    4  *
    5  * This program is free software; you can redistribute it and/or modify
    6  * it under the terms of the GNU General Public License as published by
    7  * the Free Software Foundation; either version 2, or (at your option)
    8  * any later version.
    9  *
   10  * This program is distributed in the hope that it will be useful,
   11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  * GNU General Public License for more details.
   14  *
   15  * You should have received a copy of the GNU General Public License
   16  * along with this program; if not, write to the Free Software
   17  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
   18  */
   19 
   20 #ifndef POPPLER_PAGE_RENDERER_H
   21 #define POPPLER_PAGE_RENDERER_H
   22 
   23 #include "poppler-global.h"
   24 #include "poppler-image.h"
   25 
   26 namespace poppler
   27 {
   28 
   29 typedef unsigned int argb;
   30 
   31 class page;
   32 class page_renderer_private;
   33 
   34 class POPPLER_CPP_EXPORT page_renderer : public poppler::noncopyable
   35 {
   36 public:
   37     enum render_hint {
   38         antialiasing = 0x00000001,
   39         text_antialiasing = 0x00000002,
   40         text_hinting = 0x00000004
   41     };
   42 
   43     enum line_mode_enum {
   44         line_default,
   45         line_solid,
   46         line_shape
   47     };
   48 
   49     page_renderer();
   50     ~page_renderer();
   51 
   52     argb paper_color() const;
   53     void set_paper_color(argb c);
   54 
   55     unsigned int render_hints() const;
   56     void set_render_hint(render_hint hint, bool on = true);
   57     void set_render_hints(unsigned int hints);
   58 
   59     image::format_enum image_format() const;
   60     void set_image_format(image::format_enum format);
   61 
   62     line_mode_enum line_mode() const;
   63     void set_line_mode(line_mode_enum mode);
   64 
   65     image render_page(const page *p,
   66                       double xres = 72.0, double yres = 72.0,
   67                       int x = -1, int y = -1, int w = -1, int h = -1,
   68                       rotation_enum rotate = rotate_0) const;
   69 
   70     static bool can_render();
   71 
   72 private:
   73     page_renderer_private *d;
   74     friend class page_renderer_private;
   75 };
   76 
   77 }
   78 
   79 #endif