summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/font
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-06 15:57:16 +0200
committerSven Gothel <[email protected]>2011-05-06 15:57:16 +0200
commitf5aaaf5cd65dedba658392cc30edb24b0dc3c026 (patch)
tree6b634c6ce5ffc5645a1e38abd65f610a67913290 /src/jogl/classes/jogamp/graph/font
parenteeb7c5fae3caf508fe5a6021ce700630632c6a02 (diff)
Graph / Text: Use CharSequence as char/string interface to text rendering
Implements more of John Pritchard <[email protected]> proposal https://github.com/syntelos/jogl/commit/eadee0758babcddaa5eeaffbe046e1b09f9f550e
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
-rw-r--r--src/jogl/classes/jogamp/graph/font/FontInt.java2
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java8
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/FontInt.java b/src/jogl/classes/jogamp/graph/font/FontInt.java
index f915d57f0..6c25f9a80 100644
--- a/src/jogl/classes/jogamp/graph/font/FontInt.java
+++ b/src/jogl/classes/jogamp/graph/font/FontInt.java
@@ -46,7 +46,7 @@ public interface FontInt extends Font {
public Path2D getPath(float pixelSize);
}
- public void getPaths(String string, float pixelSize,
+ public void getPaths(CharSequence string, float pixelSize,
AffineTransform transform, Path2D[] result);
//TODO: Rami - ADD getOutlines without path2D
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index dae5b3333..2e5774622 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -199,11 +199,11 @@ class TypecastFont implements FontInt {
return result;
}
- public void getPaths(String string, float pixelSize, AffineTransform transform, Path2D[] result) {
+ public void getPaths(CharSequence string, float pixelSize, AffineTransform transform, Path2D[] result) {
TypecastRenderer.getPaths(this, string, pixelSize, transform, result);
}
- public float getStringWidth(String string, float pixelSize) {
+ public float getStringWidth(CharSequence string, float pixelSize) {
float width = 0;
final int len = string.length();
for (int i=0; i< len; i++)
@@ -220,7 +220,7 @@ class TypecastFont implements FontInt {
return (int)(width + 0.5f);
}
- public float getStringHeight(String string, float pixelSize) {
+ public float getStringHeight(CharSequence string, float pixelSize) {
int height = 0;
for (int i=0; i<string.length(); i++)
@@ -274,4 +274,4 @@ class TypecastFont implements FontInt {
return FontFactory.isPrintableChar(c);
}
-} \ No newline at end of file
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
index c8861d744..f3029b1e4 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
@@ -41,7 +41,7 @@ import com.jogamp.graph.font.Font;
public class TypecastRenderer {
public static void getPaths(TypecastFont font,
- String string, float pixelSize, AffineTransform transform, Path2D[] p)
+ CharSequence string, float pixelSize, AffineTransform transform, Path2D[] p)
{
if (string == null) {
return;