KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > svggen > font > table > MaxpTable


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.svggen.font.table;
19
20 import java.io.IOException JavaDoc;
21 import java.io.RandomAccessFile JavaDoc;
22
23 /**
24  * @version $Id: MaxpTable.java,v 1.3 2004/08/18 07:15:21 vhardy Exp $
25  * @author <a HREF="mailto:david@steadystate.co.uk">David Schweinsberg</a>
26  */

27 public class MaxpTable implements Table {
28
29     private int versionNumber;
30     private int numGlyphs;
31     private int maxPoints;
32     private int maxContours;
33     private int maxCompositePoints;
34     private int maxCompositeContours;
35     private int maxZones;
36     private int maxTwilightPoints;
37     private int maxStorage;
38     private int maxFunctionDefs;
39     private int maxInstructionDefs;
40     private int maxStackElements;
41     private int maxSizeOfInstructions;
42     private int maxComponentElements;
43     private int maxComponentDepth;
44
45     protected MaxpTable(DirectoryEntry de,RandomAccessFile JavaDoc raf) throws IOException JavaDoc {
46         raf.seek(de.getOffset());
47         versionNumber = raf.readInt();
48         numGlyphs = raf.readUnsignedShort();
49         maxPoints = raf.readUnsignedShort();
50         maxContours = raf.readUnsignedShort();
51         maxCompositePoints = raf.readUnsignedShort();
52         maxCompositeContours = raf.readUnsignedShort();
53         maxZones = raf.readUnsignedShort();
54         maxTwilightPoints = raf.readUnsignedShort();
55         maxStorage = raf.readUnsignedShort();
56         maxFunctionDefs = raf.readUnsignedShort();
57         maxInstructionDefs = raf.readUnsignedShort();
58         maxStackElements = raf.readUnsignedShort();
59         maxSizeOfInstructions = raf.readUnsignedShort();
60         maxComponentElements = raf.readUnsignedShort();
61         maxComponentDepth = raf.readUnsignedShort();
62     }
63
64     public int getMaxComponentDepth() {
65         return maxComponentDepth;
66     }
67
68     public int getMaxComponentElements() {
69         return maxComponentElements;
70     }
71
72     public int getMaxCompositeContours() {
73         return maxCompositeContours;
74     }
75
76     public int getMaxCompositePoints() {
77         return maxCompositePoints;
78     }
79
80     public int getMaxContours() {
81         return maxContours;
82     }
83
84     public int getMaxFunctionDefs() {
85         return maxFunctionDefs;
86     }
87
88     public int getMaxInstructionDefs() {
89         return maxInstructionDefs;
90     }
91
92     public int getMaxPoints() {
93         return maxPoints;
94     }
95
96     public int getMaxSizeOfInstructions() {
97         return maxSizeOfInstructions;
98     }
99
100     public int getMaxStackElements() {
101         return maxStackElements;
102     }
103
104     public int getMaxStorage() {
105         return maxStorage;
106     }
107
108     public int getMaxTwilightPoints() {
109         return maxTwilightPoints;
110     }
111
112     public int getMaxZones() {
113         return maxZones;
114     }
115
116     public int getNumGlyphs() {
117         return numGlyphs;
118     }
119
120     public int getType() {
121         return maxp;
122     }
123 }
124
Popular Tags