Code

Cleaned up DOS line ends that had snuck in.
[inkscape.git] / src / extension / internal / emf-win32-print.h
1 #ifndef __INKSCAPE_EXTENSION_INTERNAL_PRINT_EMF_WIN32_H__
2 #define __INKSCAPE_EXTENSION_INTERNAL_PRINT_EMF_WIN32_H__
4 /*
5  * Enhanced Metafile Printing.
6  *
7  * Author:
8  *   Ulf Erikson <ulferikson@users.sf.net>
9  *
10  * Copyright (C) 2006 Authors
11  *
12  * Released under GNU GPL, read the file 'COPYING' for more information
13  */
15 #ifdef WIN32
17 #ifdef HAVE_CONFIG_H
18 # include "config.h"
19 #endif
21 #include "extension/implementation/implementation.h"
22 #include "extension/extension.h"
24 #include "svg/stringstream.h"
25 #include "libnr/nr-matrix.h"
26 #include "libnr/nr-rect.h"
28 #define WIN32_LEAN_AND_MEAN
29 #include <windows.h>
31 namespace Inkscape {
32 namespace Extension {
33 namespace Internal {
35 class PrintEmfWin32 : public Inkscape::Extension::Implementation::Implementation
36 {
37     double  _width;
38     double  _height;
39     HDC    hdc;
40     RECT   rc;
42     HBRUSH hbrush, hbrushOld;
43     HPEN hpen, hpenOld;
45     NArtBpath *fill_path;
46     NArtBpath *fill_path_copy;
47     NRMatrix fill_transform;
48     NRRect fill_pbox;
50     unsigned int print_bpath (const NArtBpath *bp, const NRMatrix *transform, NRRect const *pbox);
52 public:
53     PrintEmfWin32 (void);
54     virtual ~PrintEmfWin32 (void);
56     /* Print functions */
57     virtual unsigned int setup (Inkscape::Extension::Print * module);
59     virtual unsigned int begin (Inkscape::Extension::Print * module, SPDocument *doc);
60     virtual unsigned int finish (Inkscape::Extension::Print * module);
62     /* Rendering methods */
63     virtual unsigned int fill (Inkscape::Extension::Print * module,
64                                const NRBPath *bpath, const NRMatrix *ctm, const SPStyle *style,
65                                const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
66     virtual unsigned int stroke (Inkscape::Extension::Print * module,
67                                  const NRBPath *bpath, const NRMatrix *transform, const SPStyle *style,
68                                  const NRRect *pbox, const NRRect *dbox, const NRRect *bbox);
69     virtual unsigned int comment(Inkscape::Extension::Print *module, const char * comment);
70     bool textToPath (Inkscape::Extension::Print * ext);
72     static void init (void);
74 protected:
75     void create_brush(SPStyle const *style);
77     void destroy_brush();
79     void create_pen(SPStyle const *style);
81     void destroy_pen();
83     void flush_fill();
85     NArtBpath *copy_bpath(const NArtBpath *bp);
86     int cmp_bpath(const NArtBpath *bp1, const NArtBpath *bp2);
88 };
90 }  /* namespace Internal */
91 }  /* namespace Extension */
92 }  /* namespace Inkscape */
94 #endif /* WIN32 */
96 #endif /* __INKSCAPE_EXTENSION_INTERNAL_PRINT_EMF_WIN32_H__ */
98 /*
99   Local Variables:
100   mode:cpp
101   c-file-style:"stroustrup"
102   c-file-offsets:((innamespace . 0)(inline-open . 0))
103   indent-tabs-mode:nil
104   fill-column:99
105   End:
106 */
107 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :