| 1 |
|
| 2 |
package org.freehep.graphicsio.cgm; |
| 3 |
|
| 4 |
import java.io.IOException; |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
public class HatchIndex extends CGMTag { |
| 14 |
|
| 15 |
public static final int HORIZONTAL = 1; |
| 16 |
|
| 17 |
public static final int VERTICAL = 2; |
| 18 |
|
| 19 |
public static final int POSITIVE_SLOPE = 3; |
| 20 |
|
| 21 |
public static final int NEGATIVE_SLOPE = 4; |
| 22 |
|
| 23 |
public static final int HV_CROSSHATCH = 5; |
| 24 |
|
| 25 |
public static final int PN_CROSSHATCH = 6; |
| 26 |
|
| 27 |
private int index; |
| 28 |
|
| 29 |
public HatchIndex() { |
| 30 |
super(5, 24, 1); |
| 31 |
} |
| 32 |
|
| 33 |
public HatchIndex(int index) { |
| 34 |
this(); |
| 35 |
this.index = index; |
| 36 |
} |
| 37 |
|
| 38 |
public void write(int tagID, CGMOutputStream cgm) throws IOException { |
| 39 |
cgm.writeIntegerIndex(index); |
| 40 |
} |
| 41 |
|
| 42 |
public void write(int tagID, CGMWriter cgm) throws IOException { |
| 43 |
cgm.print("HATCHINDEX "); |
| 44 |
cgm.writeInteger(index); |
| 45 |
} |
| 46 |
} |