Scribus
Open source desktop publishing at your fingertips
wmfhandle.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 /* Code inspired by KOffice libwmf and adapted for Scribus by Jean Ghali */
9 
10 #ifndef WMFHANDLE_H
11 #define WMFHANDLE_H
12 
13 #include "wmfcontext.h"
14 
16 {
17 public:
18  virtual void apply( WMFContext& p ) = 0;
19  virtual ~WmfObjHandle() {};
20 };
21 
23 {
24 public:
25  virtual void apply( WMFContext& p );
26  QBrush brush;
27 };
28 
30 {
31 public:
32  virtual void apply( WMFContext& p );
33  QPen pen;
34 };
35 
37 {
38 public:
39  virtual void apply( WMFContext& p );
40  QBrush brush;
41  QPixmap image;
42 };
43 
45 {
46 public:
47  virtual void apply( WMFContext& p );
48  int charset;
49  QFont font;
50  double rotation;
51  WmfObjFontHandle() { charset = 1; rotation = 0.0; }
52 };
53 
54 void WmfObjBrushHandle::apply( WMFContext& p )
55 {
56  p.setBrush( brush );
57 }
58 
59 void WmfObjPenHandle::apply( WMFContext& p )
60 {
61  p.setPen( pen );
62 }
63 
64 void WmfObjPatternBrushHandle::apply( WMFContext& p )
65 {
66  p.setBrush( brush );
67 }
68 
69 void WmfObjFontHandle::apply( WMFContext& p )
70 {
71  p.setTextCharset( charset );
72  p.setTextRotation( rotation );
73  p.setFont( font );
74 }
75 
76 #endif
Definition: wmfhandle.h:29
Definition: wmfhandle.h:44
Definition: wmfhandle.h:36
Definition: wmfcontext.h:55
Definition: wmfhandle.h:22
Definition: wmfhandle.h:15