01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: * @author Ilya S. Okomin
19: * @version $Revision$
20: */package org.apache.harmony.awt.gl;
21:
22: import java.awt.Graphics2D;
23: import java.awt.font.GlyphVector;
24:
25: public abstract class TextRenderer {
26:
27: /**
28: * Draws string on specified Graphics at desired position.
29: *
30: * @param g specified Graphics2D object
31: * @param str String object to draw
32: * @param x start X position to draw
33: * @param y start Y position to draw
34: */
35: public abstract void drawString(Graphics2D g, String str, float x,
36: float y);
37:
38: /**
39: * Draws string on specified Graphics at desired position.
40: *
41: * @param g specified Graphics2D object
42: * @param str String object to draw
43: * @param x start X position to draw
44: * @param y start Y position to draw
45: */
46: public void drawString(Graphics2D g, String str, int x, int y) {
47: drawString(g, str, (float) x, (float) y);
48: }
49:
50: /**
51: * Draws GlyphVector on specified Graphics at desired position.
52: *
53: * @param g specified Graphics2D object
54: * @param glyphVector GlyphVector object to draw
55: * @param x start X position to draw
56: * @param y start Y position to draw
57: */
58: public abstract void drawGlyphVector(Graphics2D g,
59: GlyphVector glyphVector, float x, float y);
60: }
|