48 |
import java.awt.Image; |
import java.awt.Image; |
49 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
50 |
import java.awt.Shape; |
import java.awt.Shape; |
|
import java.awt.SystemColor; |
|
51 |
import java.awt.image.ImageObserver; |
import java.awt.image.ImageObserver; |
52 |
import java.text.AttributedCharacterIterator; |
import java.text.AttributedCharacterIterator; |
53 |
|
import java.util.regex.*; |
54 |
|
|
55 |
public class GdkGraphics extends Graphics |
public class GdkGraphics extends Graphics |
56 |
{ |
{ |
247 |
native void drawString (GdkFontPeer f, String str, int x, int y); |
native void drawString (GdkFontPeer f, String str, int x, int y); |
248 |
public void drawString (String str, int x, int y) |
public void drawString (String str, int x, int y) |
249 |
{ |
{ |
250 |
|
// FIXME: Possibly more characters we need to ignore/ |
251 |
|
// Also, implementation may be inefficent because allocating |
252 |
|
// new Strings. |
253 |
|
str = Pattern.compile("[\b | \t | \n | \f | \r | \" | \']").matcher(str).replaceAll(""); |
254 |
drawString(getFontPeer(), str, x, y); |
drawString(getFontPeer(), str, x, y); |
255 |
} |
} |
256 |
|
|
|
|
|
257 |
public void drawString (AttributedCharacterIterator ci, int x, int y) |
public void drawString (AttributedCharacterIterator ci, int x, int y) |
258 |
{ |
{ |
259 |
throw new Error ("not implemented"); |
throw new Error ("not implemented"); |