View Javadoc

1   // Copyright 2002, FreeHEP.
2   package org.freehep.graphicsio.emf.gdi;
3   
4   import java.awt.Rectangle;
5   import java.io.IOException;
6   
7   import org.freehep.graphicsio.emf.EMFConstants;
8   import org.freehep.graphicsio.emf.EMFInputStream;
9   import org.freehep.graphicsio.emf.EMFTag;
10  
11  /**
12   * ExtTextOutA TAG.
13   * 
14   * @author Mark Donszelmann
15   * @version $Id: ExtTextOutA.java 10377 2007-01-23 15:44:34Z duns $
16   */
17  public class ExtTextOutA extends AbstractExtTextOut implements EMFConstants {
18  
19      private TextA text;
20  
21      public ExtTextOutA() {
22          super(83, 1, null, 0, 1, 1);
23      }
24  
25      public ExtTextOutA(
26          Rectangle bounds,
27          int mode,
28          float xScale,
29          float yScale,
30          TextA text) {
31  
32          super(83, 1, bounds, mode, xScale, yScale);
33          this.text = text;
34      }
35  
36      public EMFTag read(int tagID, EMFInputStream emf, int len)
37              throws IOException {
38  
39          return new ExtTextOutA(
40              emf.readRECTL(),
41              emf.readDWORD(),
42              emf.readFLOAT(),
43              emf.readFLOAT(),
44              TextA.read(emf));
45      }
46  
47      public Text getText() {
48          return text;
49      }
50  }