View Javadoc

1   // Copyright 2001, FreeHEP.
2   package org.freehep.graphicsio.emf;
3   
4   import org.freehep.graphicsio.emf.gdi.AbortPath;
5   import org.freehep.graphicsio.emf.gdi.AlphaBlend;
6   import org.freehep.graphicsio.emf.gdi.AngleArc;
7   import org.freehep.graphicsio.emf.gdi.Arc;
8   import org.freehep.graphicsio.emf.gdi.ArcTo;
9   import org.freehep.graphicsio.emf.gdi.BeginPath;
10  import org.freehep.graphicsio.emf.gdi.BitBlt;
11  import org.freehep.graphicsio.emf.gdi.Chord;
12  import org.freehep.graphicsio.emf.gdi.CloseFigure;
13  import org.freehep.graphicsio.emf.gdi.CreateBrushIndirect;
14  import org.freehep.graphicsio.emf.gdi.CreateDIBPatternBrushPt;
15  import org.freehep.graphicsio.emf.gdi.CreatePen;
16  import org.freehep.graphicsio.emf.gdi.DeleteObject;
17  import org.freehep.graphicsio.emf.gdi.EMFPolygon;
18  import org.freehep.graphicsio.emf.gdi.EMFRectangle;
19  import org.freehep.graphicsio.emf.gdi.EOF;
20  import org.freehep.graphicsio.emf.gdi.Ellipse;
21  import org.freehep.graphicsio.emf.gdi.EndPath;
22  import org.freehep.graphicsio.emf.gdi.ExcludeClipRect;
23  import org.freehep.graphicsio.emf.gdi.ExtCreateFontIndirectW;
24  import org.freehep.graphicsio.emf.gdi.ExtCreatePen;
25  import org.freehep.graphicsio.emf.gdi.ExtFloodFill;
26  import org.freehep.graphicsio.emf.gdi.ExtSelectClipRgn;
27  import org.freehep.graphicsio.emf.gdi.ExtTextOutA;
28  import org.freehep.graphicsio.emf.gdi.ExtTextOutW;
29  import org.freehep.graphicsio.emf.gdi.FillPath;
30  import org.freehep.graphicsio.emf.gdi.FlattenPath;
31  import org.freehep.graphicsio.emf.gdi.GDIComment;
32  import org.freehep.graphicsio.emf.gdi.GradientFill;
33  import org.freehep.graphicsio.emf.gdi.IntersectClipRect;
34  import org.freehep.graphicsio.emf.gdi.LineTo;
35  import org.freehep.graphicsio.emf.gdi.ModifyWorldTransform;
36  import org.freehep.graphicsio.emf.gdi.MoveToEx;
37  import org.freehep.graphicsio.emf.gdi.OffsetClipRgn;
38  import org.freehep.graphicsio.emf.gdi.Pie;
39  import org.freehep.graphicsio.emf.gdi.PolyBezier;
40  import org.freehep.graphicsio.emf.gdi.PolyBezier16;
41  import org.freehep.graphicsio.emf.gdi.PolyBezierTo;
42  import org.freehep.graphicsio.emf.gdi.PolyBezierTo16;
43  import org.freehep.graphicsio.emf.gdi.PolyDraw;
44  import org.freehep.graphicsio.emf.gdi.PolyDraw16;
45  import org.freehep.graphicsio.emf.gdi.PolyPolygon;
46  import org.freehep.graphicsio.emf.gdi.PolyPolygon16;
47  import org.freehep.graphicsio.emf.gdi.PolyPolyline;
48  import org.freehep.graphicsio.emf.gdi.PolyPolyline16;
49  import org.freehep.graphicsio.emf.gdi.Polygon16;
50  import org.freehep.graphicsio.emf.gdi.Polyline;
51  import org.freehep.graphicsio.emf.gdi.Polyline16;
52  import org.freehep.graphicsio.emf.gdi.PolylineTo;
53  import org.freehep.graphicsio.emf.gdi.PolylineTo16;
54  import org.freehep.graphicsio.emf.gdi.RealizePalette;
55  import org.freehep.graphicsio.emf.gdi.ResizePalette;
56  import org.freehep.graphicsio.emf.gdi.RestoreDC;
57  import org.freehep.graphicsio.emf.gdi.RoundRect;
58  import org.freehep.graphicsio.emf.gdi.SaveDC;
59  import org.freehep.graphicsio.emf.gdi.ScaleViewportExtEx;
60  import org.freehep.graphicsio.emf.gdi.ScaleWindowExtEx;
61  import org.freehep.graphicsio.emf.gdi.SelectClipPath;
62  import org.freehep.graphicsio.emf.gdi.SelectObject;
63  import org.freehep.graphicsio.emf.gdi.SelectPalette;
64  import org.freehep.graphicsio.emf.gdi.SetArcDirection;
65  import org.freehep.graphicsio.emf.gdi.SetBkColor;
66  import org.freehep.graphicsio.emf.gdi.SetBkMode;
67  import org.freehep.graphicsio.emf.gdi.SetBrushOrgEx;
68  import org.freehep.graphicsio.emf.gdi.SetICMMode;
69  import org.freehep.graphicsio.emf.gdi.SetMapMode;
70  import org.freehep.graphicsio.emf.gdi.SetMapperFlags;
71  import org.freehep.graphicsio.emf.gdi.SetMetaRgn;
72  import org.freehep.graphicsio.emf.gdi.SetMiterLimit;
73  import org.freehep.graphicsio.emf.gdi.SetPixelV;
74  import org.freehep.graphicsio.emf.gdi.SetPolyFillMode;
75  import org.freehep.graphicsio.emf.gdi.SetROP2;
76  import org.freehep.graphicsio.emf.gdi.SetStretchBltMode;
77  import org.freehep.graphicsio.emf.gdi.SetTextAlign;
78  import org.freehep.graphicsio.emf.gdi.SetTextColor;
79  import org.freehep.graphicsio.emf.gdi.SetViewportExtEx;
80  import org.freehep.graphicsio.emf.gdi.SetViewportOrgEx;
81  import org.freehep.graphicsio.emf.gdi.SetWindowExtEx;
82  import org.freehep.graphicsio.emf.gdi.SetWindowOrgEx;
83  import org.freehep.graphicsio.emf.gdi.SetWorldTransform;
84  import org.freehep.graphicsio.emf.gdi.StretchDIBits;
85  import org.freehep.graphicsio.emf.gdi.StrokeAndFillPath;
86  import org.freehep.graphicsio.emf.gdi.StrokePath;
87  import org.freehep.graphicsio.emf.gdi.WidenPath;
88  
89  import org.freehep.util.io.TagSet;
90  
91  /**
92   * EMF specific tagset.
93   * 
94   * @author Mark Donszelmann
95   * @version $Id: EMFTagSet.java 10515 2007-02-06 18:42:34Z duns $
96   */
97  public class EMFTagSet extends TagSet {
98  
99      public EMFTagSet(int version) {
100         if (version >= 1) {
101             // Set for Windows 3
102             addTag(new PolyBezier()); // 2 02
103             addTag(new EMFPolygon()); // 3 03
104             addTag(new Polyline()); // 4 04
105             addTag(new PolyBezierTo()); // 5 05
106             addTag(new PolylineTo()); // 6 06
107             addTag(new PolyPolyline()); // 7 07
108             addTag(new PolyPolygon()); // 8 08
109             addTag(new SetWindowExtEx()); // 9 09
110             addTag(new SetWindowOrgEx()); // 10 0a
111             addTag(new SetViewportExtEx()); // 11 0b
112             addTag(new SetViewportOrgEx()); // 12 0c
113             addTag(new SetBrushOrgEx()); // 13 0d
114             addTag(new EOF()); // 14 0e
115             addTag(new SetPixelV()); // 15 0f
116             addTag(new SetMapperFlags()); // 16 10
117             addTag(new SetMapMode()); // 17 11
118             addTag(new SetBkMode()); // 18 12
119             addTag(new SetPolyFillMode()); // 19 13
120             addTag(new SetROP2()); // 20 14
121             addTag(new SetStretchBltMode()); // 21 15
122             addTag(new SetTextAlign()); // 22 16
123             // addTag(new SetColorAdjustment()); // 23 17
124             addTag(new SetTextColor()); // 24 18
125             addTag(new SetBkColor()); // 25 19
126             addTag(new OffsetClipRgn()); // 26 1a
127             addTag(new MoveToEx()); // 27 1b
128             addTag(new SetMetaRgn()); // 28 1c
129             addTag(new ExcludeClipRect()); // 29 1d
130             addTag(new IntersectClipRect()); // 30 1e
131             addTag(new ScaleViewportExtEx()); // 31 1f
132             addTag(new ScaleWindowExtEx()); // 32 20
133             addTag(new SaveDC()); // 33 21
134             addTag(new RestoreDC()); // 34 22
135             addTag(new SetWorldTransform()); // 35 23
136             addTag(new ModifyWorldTransform()); // 36 24
137             addTag(new SelectObject()); // 37 25
138             addTag(new CreatePen()); // 38 26
139             addTag(new CreateBrushIndirect()); // 39 27
140             addTag(new DeleteObject()); // 40 28
141             addTag(new AngleArc()); // 41 29
142             addTag(new Ellipse()); // 42 2a
143             addTag(new EMFRectangle()); // 43 2b
144             addTag(new RoundRect()); // 44 2c
145             addTag(new Arc()); // 45 2d
146             addTag(new Chord()); // 46 2e
147             addTag(new Pie()); // 47 2f
148             addTag(new SelectPalette()); // 48 30
149             // addTag(new CreatePalette()); // 49 31
150             // addTag(new SetPaletteEntries()); // 50 32
151             addTag(new ResizePalette()); // 51 33
152             addTag(new RealizePalette()); // 52 34
153             addTag(new ExtFloodFill()); // 53 35
154             addTag(new LineTo()); // 54 36
155             addTag(new ArcTo()); // 55 37
156             addTag(new PolyDraw()); // 56 38
157             addTag(new SetArcDirection()); // 57 39
158             addTag(new SetMiterLimit()); // 58 3a
159             addTag(new BeginPath()); // 59 3b
160             addTag(new EndPath()); // 60 3c
161             addTag(new CloseFigure()); // 61 3d
162             addTag(new FillPath()); // 62 3e
163             addTag(new StrokeAndFillPath()); // 63 3f
164             addTag(new StrokePath()); // 64 40
165             addTag(new FlattenPath()); // 65 41
166             addTag(new WidenPath()); // 66 42
167             addTag(new SelectClipPath()); // 67 43
168             addTag(new AbortPath()); // 68 44
169             // this tag does not exist // 69 45
170             addTag(new GDIComment()); // 70 46
171             // addTag(new FillRgn()); // 71 47
172             // addTag(new FrameRgn()); // 72 48
173             // addTag(new InvertRgn()); // 73 49
174             // addTag(new PaintRgn()); // 74 4a
175             addTag(new ExtSelectClipRgn()); // 75 4b
176             addTag(new BitBlt()); // 76 4c
177             // addTag(new StretchBlt()); // 77 4d
178             // addTag(new MaskBlt()); // 78 4e
179             // addTag(new PlgBlt()); // 79 4f
180             // addTag(new SetDIBitsToDevice()); // 80 50
181             addTag(new StretchDIBits()); // 81 51
182             addTag(new ExtCreateFontIndirectW()); // 82 52
183             addTag(new ExtTextOutA()); // 83 53
184             addTag(new ExtTextOutW()); // 84 54
185             addTag(new PolyBezier16()); // 85 55
186             addTag(new Polygon16()); // 86 56
187             addTag(new Polyline16()); // 87 57
188             addTag(new PolyBezierTo16()); // 88 58
189             addTag(new PolylineTo16()); // 89 59
190             addTag(new PolyPolyline16()); // 90 5a
191             addTag(new PolyPolygon16()); // 91 5b
192             addTag(new PolyDraw16()); // 92 5c
193             // addTag(new CreateMonoBrush()); // 93 5d
194             addTag(new CreateDIBPatternBrushPt()); // 94 5e
195             addTag(new ExtCreatePen()); // 95 5f
196             // addTag(new PolyTextOutA()); // 96 60
197             // addTag(new PolyTextOutW()); // 97 61
198 
199             // Set for Windows 4 (NT)
200             addTag(new SetICMMode()); // 98 62
201             // addTag(new CreateColorSpace()); // 99 63
202             // addTag(new SetColorSpace()); // 100 64
203             // addTag(new DeleteColorSpace()); // 101 65
204             // addTag(new GLSRecord()); // 102 66
205             // addTag(new GLSBoundedRecord()); // 103 67
206             // addTag(new PixelFormat()); // 104 68
207 
208             // Set for Windows 5 (2000/XP)
209             // addTag(new DrawEscape()); // 105 69
210             // addTag(new ExtEscape()); // 106 6a
211             // addTag(new StartDoc()); // 107 6b
212             // addTag(new SmallTextOut()); // 108 6c
213             // addTag(new ForceUFIMapping()); // 109 6d
214             // addTag(new NamedEscape()); // 110 6e
215             // addTag(new ColorCorrectPalette()); // 111 6f
216             // addTag(new SetICMProfileA()); // 112 70
217             // addTag(new SetICMProfileW()); // 113 71
218             addTag(new AlphaBlend()); // 114 72
219             // addTag(new AlphaDIBBlend()); // 115 73
220             // addTag(new TransparentBlt()); // 116 74
221             // addTag(new TransparentDIB()); // 117 75
222             addTag(new GradientFill()); // 118 76
223             // addTag(new SetLinkedUFIs()); // 119 77
224             // addTag(new SetTextJustification()); // 120 78
225         }
226     }
227 }