Debian Codegraph @

freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/RealPrecision.java

raw symbols SCIP
1 // Copyright 2001, FreeHEP.
2 package org.freehep.graphicsio.cgm;
3
4 import java.io.IOException;
5
6 /**
7 * RealPrecision TAG.
8 *
9 * @author Mark Donszelmann
10 * @author Charles Loomis
11 * @version $Id: freehep-graphicsio-cgm/src/main/java/org/freehep/graphicsio/cgm/RealPrecision.java 278fac7cefaa 2005/12/05 04:00:43 duns $
12 */
13 public class RealPrecision extends CGMTag {
14
15 // FIXME: not complete
16 public RealPrecision() {
17 super(1, 5, 1);
18 }
19
20 public void write(int tagID, CGMOutputStream cgm) throws IOException {
21
22 cgm.setRealPrecision(false, true);
23 cgm.writeEnumerate(0); // floating
24 cgm.writeInteger(12); // double exp
25 cgm.writeInteger(52); // double fract
26 }
27
28 public void write(int tagID, CGMWriter cgm) throws IOException {
29 cgm.setRealPrecision(false, true);
30 cgm.print("REALPREC ");
31 cgm.writeReal(Double.MIN_VALUE);
32 cgm.print(", ");
33 cgm.writeReal(Double.MAX_VALUE);
34 cgm.print(", ");
35 cgm.writeInteger(20); // FIXME: check
36 }
37 }