| 1 |
|
| 2 |
package org.freehep.graphicsio.cgm; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
public class CharacterOrientation extends CGMTag { |
| 14 |
|
| 15 |
private double xUp, yUp, xBase, yBase; |
| 16 |
|
| 17 |
public CharacterOrientation() { |
| 18 |
super(5, 16, 1); |
| 19 |
} |
| 20 |
|
| 21 |
public CharacterOrientation(double xUp, double yUp, double xBase, |
| 22 |
double yBase) { |
| 23 |
this(); |
| 24 |
this.xUp = xUp; |
| 25 |
this.yUp = yUp; |
| 26 |
this.xBase = xBase; |
| 27 |
this.yBase = yBase; |
| 28 |
} |
| 29 |
|
| 30 |
public void write(int tagID, CGMOutputStream cgm) throws IOException { |
| 31 |
cgm.writeVDC(xUp); |
| 32 |
cgm.writeVDC(yUp); |
| 33 |
cgm.writeVDC(xBase); |
| 34 |
cgm.writeVDC(yBase); |
| 35 |
} |
| 36 |
|
| 37 |
public void write(int tagID, CGMWriter cgm) throws IOException { |
| 38 |
cgm.print("CHARORI "); |
| 39 |
cgm.writeVDC(xUp); |
| 40 |
cgm.print(", "); |
| 41 |
cgm.writeVDC(yUp); |
| 42 |
cgm.print(", "); |
| 43 |
cgm.writeVDC(xBase); |
| 44 |
cgm.print(", "); |
| 45 |
cgm.writeVDC(yBase); |
| 46 |
} |
| 47 |
} |