2 Copyright (C) 2003 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package gnu.java.awt.peer.gtk;
42 import java.awt.geom.*;
43 import java.awt.font.*;
44 import java.awt.color.*;
45 import java.awt.image.*;
46 import java.awt.image.renderable.*;
48 import java.text.AttributedCharacterIterator;
50 import java.lang.Integer;
51 import gnu.classpath.Configuration;
53 public class GdkGraphics2D extends Graphics2D
56 //////////////////////////////////////
57 ////// State Management Methods //////
58 //////////////////////////////////////
62 if (Configuration.INIT_LOAD_LIBRARY)
64 System.loadLibrary("gtkpeer");
68 native static void initStaticState ();
69 private final int native_state = GtkGenericPeer.getUniqueInteger();
72 private Stroke stroke;
76 private AffineTransform transform;
77 private GtkComponentPeer component;
80 native private int[] initState (GtkComponentPeer component);
81 native private void initState (int width, int height);
82 native private void copyState (GdkGraphics2D g);
83 native public void dispose ();
85 public void finalize ()
90 public Graphics create ()
92 return new GdkGraphics2D (this);
95 public Graphics create (int x, int y, int width, int height)
97 return new GdkGraphics2D (width, height);
100 GdkGraphics2D (GdkGraphics2D g)
105 if (g.fg.getAlpha() != -1)
106 fg = new Color (g.fg.getRed (), g.fg.getGreen (),
107 g.fg.getBlue (), g.fg.getAlpha ());
109 fg = new Color (g.fg.getRGB ());
111 if (g.bg.getAlpha() != -1)
112 bg = new Color(g.bg.getRed (), g.bg.getGreen (),
113 g.bg.getBlue (), g.bg.getAlpha ());
115 bg = new Color (g.bg.getRGB ());
120 clip = new Rectangle (g.getClipBounds ());
122 if (g.transform == null)
125 transform = new AffineTransform (g.transform);
127 component = g.component;
132 setTransform (transform);
135 GdkGraphics2D (int width, int height)
137 initState (width, height);
140 transform = new AffineTransform ();
143 GdkGraphics2D (GtkComponentPeer component)
145 this.component = component;
146 int rgb[] = initState (component);
147 fg = new Color (rgb[0], rgb[1], rgb[2]);
148 bg = new Color (rgb[3], rgb[4], rgb[5]);
149 transform = new AffineTransform ();
153 ////////////////////////////////////
154 ////// Native Drawing Methods //////
155 ////////////////////////////////////
157 // GDK drawing methods
158 private native void gdkDrawDrawable (GdkGraphics2D other, int x, int y);
160 // drawing utility methods
161 private native void drawPixels (int pixels[], int w, int h, int stride);
162 private native void setTexturePixels (int pixels[], int w, int h, int stride);
163 private native void setGradient (double x1, double y1,
164 double x2, double y2,
165 int r1, int g1, int b1, int a1,
166 int r2, int g2, int b2, int a2,
169 // simple passthroughs to cairo
170 private native void cairoSave ();
171 private native void cairoRestore ();
172 private native void cairoSetMatrix (double m00, double m10,
173 double m01, double m11,
174 double m02, double m12);
175 private native void cairoSetOperator (int cairoOperator);
176 private native void cairoSetRGBColor (double red, double green, double blue);
177 private native void cairoSetAlpha (double alpha);
178 private native void cairoSetFillRule (int cairoFillRule);
179 private native void cairoSetLineWidth (double width);
180 private native void cairoSetLineCap (int cairoLineCap);
181 private native void cairoSetLineJoin (int cairoLineJoin);
182 private native void cairoSetDash (double dashes[], int ndash, double offset);
183 private native void cairoSetMiterLimit (double limit);
184 private native void cairoTranslate (double tx, double ty);
185 private native void cairoScale (double sx, double sy);
186 private native void cairoRotate (double angle);
187 private native void cairoNewPath ();
188 private native void cairoMoveTo (double x, double y);
189 private native void cairoLineTo (double x, double y);
190 private native void cairoCurveTo (double x1, double y1,
191 double x2, double y2,
192 double x3, double y3);
193 private native void cairoRelMoveTo (double dx, double dy);
194 private native void cairoRelLineTo (double dx, double dy);
195 private native void cairoRelCurveTo (double dx1, double dy1,
196 double dx2, double dy2,
197 double dx3, double dy3);
198 private native void cairoRectangle (double x, double y,
199 double width, double height);
200 private native void cairoClosePath ();
201 private native void cairoStroke ();
202 private native void cairoFill ();
203 private native void cairoClip ();
206 /////////////////////////////////////////////
207 ////// General Drawing Support Methods //////
208 /////////////////////////////////////////////
212 private void setPos (double nx, double ny)
218 private void walkPath(PathIterator p)
220 double coords[] = new double[6];
222 cairoSetFillRule (p.getWindingRule ());
223 for ( ; ! p.isDone (); p.next())
225 int seg = p.currentSegment (coords);
229 case PathIterator.SEG_MOVETO:
230 setPos(coords[0], coords[1]);
231 cairoMoveTo (coords[0], coords[1]);
234 case PathIterator.SEG_LINETO:
235 setPos(coords[0], coords[1]);
236 cairoLineTo (coords[0], coords[1]);
239 case PathIterator.SEG_QUADTO:
241 // splitting a quadratic bezier into a cubic:
242 // see: http://pfaedit.sourceforge.net/bezier.html
244 double x1 = x + (2.0/3.0) * (coords[0] - x);
245 double y1 = y + (2.0/3.0) * (coords[1] - y);
247 double x2 = x1 + (1.0/3.0) * (coords[2] - x);
248 double y2 = y1 + (1.0/3.0) * (coords[3] - y);
250 setPos(coords[2], coords[3]);
251 cairoCurveTo (x1, y1,
253 coords[2], coords[3]);
256 case PathIterator.SEG_CUBICTO:
257 setPos(coords[4], coords[5]);
258 cairoCurveTo (coords[0], coords[1],
259 coords[2], coords[3],
260 coords[4], coords[5]);
263 case PathIterator.SEG_CLOSE:
271 //////////////////////////////////////////////////
272 ////// Implementation of Graphics2D Methods //////
273 //////////////////////////////////////////////////
275 public void draw (Shape s)
278 if (stroke != null &&
279 !(stroke instanceof BasicStroke))
281 fill (stroke.createStrokedShape (s));
287 if (s instanceof Rectangle2D)
289 Rectangle2D r = (Rectangle2D)s;
290 cairoRectangle (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
293 walkPath (s.getPathIterator (null));
298 public void fill(Shape s)
302 if (s instanceof Rectangle2D)
304 Rectangle2D r = (Rectangle2D)s;
305 cairoRectangle (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
308 walkPath (s.getPathIterator (null));
313 public void clip (Shape s)
317 if (s instanceof Rectangle2D)
319 Rectangle2D r = (Rectangle2D)s;
320 cairoRectangle (r.getX (), r.getY (),
321 r.getWidth (), r.getHeight ());
324 walkPath (s.getPathIterator (null));
329 public Paint getPaint ()
334 public AffineTransform getTransform ()
339 public void setPaint (Paint p)
342 if (paint instanceof Color)
344 setColor ((Color) paint);
346 else if (paint instanceof TexturePaint)
348 TexturePaint tp = (TexturePaint) paint;
349 BufferedImage img = tp.getImage ();
350 int pixels[] = img.getRGB(0, 0, img.getWidth (),
351 img.getHeight (), null,
353 setTexturePixels (pixels, img.getWidth (),
354 img.getHeight (), img.getWidth ());
356 else if (paint instanceof GradientPaint)
358 GradientPaint gp = (GradientPaint) paint;
359 Point2D p1 = gp.getPoint1 ();
360 Point2D p2 = gp.getPoint2 ();
361 Color c1 = gp.getColor1 ();
362 Color c2 = gp.getColor2 ();
363 setGradient (p1.getX (), p1.getY (),
364 p2.getX (), p2.getY (),
365 c1.getRed (), c1.getGreen (),
366 c1.getBlue (), c1.getAlpha (),
367 c2.getRed (), c2.getGreen (),
368 c2.getBlue (), c2.getAlpha (),
372 throw new java.lang.UnsupportedOperationException ();
375 public void setTransform (AffineTransform tx)
378 if (transform != null)
380 double m[] = new double[6];
381 transform.getMatrix (m);
382 cairoSetMatrix (m[0], m[1], m[2], m[3], m[4], m[5]);
386 public void transform (AffineTransform tx)
388 if (transform == null)
389 transform = new AffineTransform (tx);
391 transform.concatenate (tx);
392 setTransform (transform);
395 public void rotate(double theta)
397 if (transform != null)
398 transform.rotate (theta);
402 public void rotate(double theta, double x, double y)
404 if (transform != null)
405 transform.rotate (theta, x, y);
406 cairoTranslate (x, y);
408 cairoTranslate (-x, -y);
411 public void scale(double sx, double sy)
413 if (transform != null)
414 transform.scale (sx, sy);
418 public void translate (double tx, double ty)
420 if (transform != null)
421 transform.translate (tx, ty);
422 cairoTranslate (tx, ty);
425 public void translate (int x, int y)
427 translate ((double) x, (double) y);
430 public Stroke getStroke()
435 public void setStroke (Stroke st)
438 if (stroke instanceof BasicStroke)
440 BasicStroke bs = (BasicStroke) stroke;
441 cairoSetLineCap (bs.getEndCap());
442 cairoSetLineWidth (bs.getLineWidth());
443 cairoSetLineJoin (bs.getLineJoin());
444 cairoSetMiterLimit (bs.getMiterLimit());
445 float dashes[] = bs.getDashArray();
448 double double_dashes[] = new double[dashes.length];
449 for (int i = 0; i < dashes.length; i++)
450 double_dashes[i] = dashes[i];
451 cairoSetDash (double_dashes, double_dashes.length,
452 (double) bs.getDashPhase ());
458 ////////////////////////////////////////////////
459 ////// Implementation of Graphics Methods //////
460 ////////////////////////////////////////////////
462 public void setPaintMode ()
464 setComposite (java.awt.AlphaComposite.Xor);
467 public void setXORMode (Color c)
469 setComposite (new BitwiseXorComposite (c));
472 public void setColor (Color c)
475 cairoSetRGBColor (fg.getRed() / 255.0,
476 fg.getGreen() / 255.0,
477 fg.getBlue() / 255.0);
478 cairoSetAlpha ((fg.getAlpha() & 255) / 255.0);
481 public Color getColor ()
486 public void clipRect (int x, int y, int width, int height)
488 // this is *slightly* different than all the other clip functions: it
489 // intersects the clip area with the new clip rectangle. obviously. of
490 // course, since Shape doesn't *have* any way of intersecting with a
491 // rectangle, we will promote the current clipping region to its
492 // bounding rectangle and then intersect with that.
496 cairoRectangle (x, y, width, height);
499 clip = new Rectangle (x, y, width, height);
503 clip (clip.getBounds ().intersection
504 (new Rectangle (x, y, width, height)));
508 public Shape getClip ()
513 public Rectangle getClipBounds ()
518 return clip.getBounds ();
521 public void setClip (int x, int y, int width, int height)
524 cairoRectangle (x, y, width, height);
527 clip = new Rectangle (x, y, width, height);
530 public void setClip (Shape s)
535 public void draw3DRect(int x, int y, int width,
536 int height, boolean raised)
539 Color light = std.brighter();
540 Color dark = std.darker();
549 double x1 = (double) x;
550 double x2 = (double) x + width;
552 double y1 = (double) y;
553 double y2 = (double) y + height;
559 cairoMoveTo (x1, y1);
560 cairoLineTo (x2, y1);
561 cairoLineTo (x2, y2);
566 cairoMoveTo (x1, y1);
567 cairoLineTo (x1, y2);
568 cairoLineTo (x2, y2);
576 public void fill3DRect(int x, int y, int width,
577 int height, boolean raised)
580 if (stroke != null && stroke instanceof BasicStroke)
582 BasicStroke bs = (BasicStroke) stroke;
583 step = bs.getLineWidth();
586 Color bright = fg.brighter ();
587 Color dark = fg.darker ();
589 draw3DRect (x, y, width, height, raised);
592 cairoTranslate (step/2.0, step/2.0);
594 cairoRectangle ((double) x, (double) y,
595 ((double) width) - step,
596 ((double) height) - step );
603 public void drawRect (int x, int y, int width, int height)
605 draw(new Rectangle (x, y, width, height));
608 public void fillRect (int x, int y, int width, int height)
610 fill(new Rectangle (x, y, width, height));
613 public void clearRect (int x, int y, int width, int height)
616 cairoSetRGBColor (bg.getRed() / 255.0,
617 bg.getGreen() / 255.0,
618 bg.getBlue() / 255.0);
621 cairoRectangle (x, y, width, height);
627 public void setBackground(Color c)
633 public Color getBackground()
639 private void doPolygon(int[] xPoints, int[] yPoints, int nPoints,
640 boolean close, boolean fill)
644 GeneralPath gp = new GeneralPath ();
645 gp.moveTo ((float)xPoints[0], (float)yPoints[0]);
646 for (int i = 1; i < nPoints; i++)
647 gp.lineTo ((float)xPoints[i], (float)yPoints[i]);
655 !(stroke instanceof BasicStroke))
657 sh = stroke.createStrokedShape (gp);
667 public void drawLine (int x1, int y1, int x2, int y2)
669 int xp[] = new int[2];
670 int yp[] = new int[2];
677 doPolygon (xp, yp, 2, false, false);
680 public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
682 doPolygon (xPoints, yPoints, nPoints, true, true);
685 public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
687 doPolygon (xPoints, yPoints, nPoints, true, false);
690 public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
692 doPolygon (xPoints, yPoints, nPoints, false, false);
695 private boolean drawRaster (ColorModel cm, Raster r)
700 SampleModel sm = r.getSampleModel ();
701 DataBuffer db = r.getDataBuffer ();
703 if (db == null || sm == null)
707 cm = ColorModel.getRGBdefault ();
711 if (sm.getDataType () == DataBuffer.TYPE_INT &&
712 db instanceof DataBufferInt &&
713 db.getNumBanks () == 1)
715 // single bank, ARGB-ints buffer in sRGB space
716 DataBufferInt dbi = (DataBufferInt)db;
717 pixels = dbi.getData ();
720 pixels = r.getPixels (0, 0, r.getWidth (), r.getHeight (), pixels);
722 ColorSpace cs = cm.getColorSpace ();
724 cs.getType () != ColorSpace.CS_sRGB)
726 int pixels2[] = new int[pixels.length];
727 for (int i = 0; i < pixels2.length; i++)
728 pixels2[i] = cm.getRGB (pixels[i]);
733 cairoTranslate (x, y);
734 drawPixels (pixels, r.getWidth (), r.getHeight (), r.getWidth ());
739 public boolean drawImage (Image img, int x, int y,
740 ImageObserver observer)
742 if (img instanceof GtkOffScreenImage &&
743 img.getGraphics () instanceof GdkGraphics2D &&
744 (transform == null || transform.isIdentity ()))
746 // we are being asked to flush a double buffer from Gdk
747 GdkGraphics2D g2 = (GdkGraphics2D) img.getGraphics ();
748 gdkDrawDrawable (g2, x, y);
753 if (img instanceof BufferedImage)
755 // draw an image which has actually been loaded into memory fully
756 BufferedImage b = (BufferedImage) img;
757 return drawRaster (b.getColorModel (), b.getData ());
761 // begin progressive loading in a separate thread
762 new PainterThread (this, img);
769 ////////////////////////////////////////
770 ////// Supporting Private Classes //////
771 ////////////////////////////////////////
773 private class PainterThread implements Runnable, ImageConsumer
776 // this is a helper which is spun off when someone tries to do
777 // Graphics2D.drawImage on an image we cannot determine to be either
778 // one of our own offscreen images or a BufferedImage; that is, when
779 // someone wants to draw an image which is possibly still loading over
780 // a network or something. you run it in a separate thread and it
781 // writes through to the underlying Graphics2D as pixels becomg
786 ColorModel defaultModel;
788 public PainterThread (GdkGraphics2D g, Image im)
791 this.gr = (GdkGraphics2D) g.create ();
792 new Thread (this).start ();
795 public void imageComplete (int status)
799 public void setColorModel (ColorModel model)
801 defaultModel = model;
804 public void setDimensions (int width, int height)
808 public void setHints (int hintflags)
812 public void setPixels (int x, int y, int w, int h, ColorModel model,
813 byte[] pixels, int off, int scansize)
817 public void setPixels (int x, int y, int w, int h, ColorModel model,
818 int[] pixels, int off, int scansize)
821 gr.cairoTranslate (x, y);
824 model = defaultModel;
829 pixels2 = new int[pixels.length];
830 for (int yy = 0; yy < h; yy++)
831 for (int xx = 0; xx < w; xx++)
833 int i = yy * scansize + xx;
834 pixels2[i] = model.getRGB (pixels[i]);
840 gr.drawPixels (pixels2, w, h, scansize);
844 public void setProperties (java.util.Hashtable props)
850 image.getSource ().startProduction (this);
856 private class BitwiseXorComposite implements Composite
858 // this is a special class which does a bitwise XOR composite, for
859 // backwards compatibility sake. it does *not* implement the
860 // porter-duff XOR operator. the porter-duff XOR is unrelated to
861 // bitwise XOR; it just happens to have a similar name but it
862 // represents a desire to composite the exclusive or of overlapping
863 // subpixel regions. bitwise XOR is for drawing "highlights" such as
864 // cursors (in a cheap oldskool bitblit fashion) by inverting colors
865 // temporarily and then inverting them back.
869 class BitwiseXorCompositeContext implements CompositeContext
871 ColorModel srcColorModel;
872 ColorModel dstColorModel;
874 public BitwiseXorCompositeContext (ColorModel s,
881 public void dispose ()
885 public void compose (Raster src,
887 WritableRaster dstOut)
889 Rectangle srcRect = src.getBounds ();
890 Rectangle dstInRect = dstIn.getBounds ();
891 Rectangle dstOutRect = dstOut.getBounds ();
893 int xp = xorColor.getRGB ();
895 int w = Math.min (Math.min (srcRect.width, dstOutRect.width), dstInRect.width);
896 int h = Math.min (Math.min (srcRect.height, dstOutRect.height), dstInRect.height);
897 Object srcPix = null, dstPix = null;
899 for (y = 0; y < h; y++)
900 for (x = 0; x < w; x++)
902 srcPix = src.getDataElements (x + srcRect.x, y + srcRect.y, srcPix);
903 dstPix = dstIn.getDataElements (x + dstInRect.x, y + dstInRect.y, dstPix);
904 int sp = srcColorModel.getRGB (srcPix);
905 int dp = dstColorModel.getRGB (dstPix);
906 int rp = sp ^ xp ^ dp;
907 dstOut.setDataElements (x + dstOutRect.x, y + dstOutRect.y,
908 dstColorModel.getDataElements (rp, null));
913 public BitwiseXorComposite (Color c)
918 public CompositeContext createContext (ColorModel srcColorModel,
919 ColorModel dstColorModel,
920 RenderingHints hints)
922 return new BitwiseXorCompositeContext (srcColorModel, dstColorModel);
927 ///////////////////////////////////////////////
928 ////// Unimplemented Stubs and Overloads //////
929 ///////////////////////////////////////////////
931 public boolean drawImage(Image image,
932 AffineTransform xform,
935 throw new java.lang.UnsupportedOperationException ();
938 public void drawImage(BufferedImage image,
943 throw new java.lang.UnsupportedOperationException ();
946 public void drawRenderedImage(RenderedImage image,
947 AffineTransform xform)
949 throw new java.lang.UnsupportedOperationException ();
952 public void drawRenderableImage(RenderableImage image,
953 AffineTransform xform)
955 throw new java.lang.UnsupportedOperationException ();
958 public void drawString(String text, float x, float y)
960 throw new java.lang.UnsupportedOperationException ();
963 public void drawString(AttributedCharacterIterator iterator,
966 throw new java.lang.UnsupportedOperationException ();
969 public boolean hit(Rectangle rect, Shape text,
972 throw new java.lang.UnsupportedOperationException ();
975 public GraphicsConfiguration getDeviceConfiguration()
977 throw new java.lang.UnsupportedOperationException ();
980 public void setComposite(Composite comp)
982 throw new java.lang.UnsupportedOperationException ();
985 public void setRenderingHint(RenderingHints.Key hintKey,
988 throw new java.lang.UnsupportedOperationException ();
991 public Object getRenderingHint(RenderingHints.Key hintKey)
993 throw new java.lang.UnsupportedOperationException ();
996 public void setRenderingHints(Map hints)
998 throw new java.lang.UnsupportedOperationException ();
1001 public void addRenderingHints(Map hints)
1003 throw new java.lang.UnsupportedOperationException ();
1006 public RenderingHints getRenderingHints()
1008 throw new java.lang.UnsupportedOperationException ();
1011 public void shear(double shearX, double shearY)
1013 throw new java.lang.UnsupportedOperationException ();
1016 public Composite getComposite()
1018 throw new java.lang.UnsupportedOperationException ();
1021 public FontRenderContext getFontRenderContext ()
1023 throw new java.lang.UnsupportedOperationException ();
1026 public void drawGlyphVector (GlyphVector g, float x, float y)
1028 throw new java.lang.UnsupportedOperationException ();
1031 public void copyArea (int x, int y, int width, int height, int dx, int dy)
1033 throw new java.lang.UnsupportedOperationException ();
1036 public void drawArc (int x, int y, int width, int height,
1037 int startAngle, int arcAngle)
1039 throw new java.lang.UnsupportedOperationException ();
1042 public boolean drawImage (Image img, int x, int y, Color bgcolor,
1043 ImageObserver observer)
1045 throw new java.lang.UnsupportedOperationException ();
1048 public boolean drawImage (Image img, int x, int y, int width, int height,
1049 Color bgcolor, ImageObserver observer)
1051 throw new java.lang.UnsupportedOperationException ();
1054 public boolean drawImage (Image img, int x, int y, int width, int height,
1055 ImageObserver observer)
1057 throw new java.lang.UnsupportedOperationException ();
1060 public boolean drawImage (Image img, int dx1, int dy1, int dx2, int dy2,
1061 int sx1, int sy1, int sx2, int sy2,
1062 Color bgcolor, ImageObserver observer)
1064 throw new java.lang.UnsupportedOperationException ();
1067 public boolean drawImage (Image img, int dx1, int dy1, int dx2, int dy2,
1068 int sx1, int sy1, int sx2, int sy2,
1069 ImageObserver observer)
1071 throw new java.lang.UnsupportedOperationException ();
1074 public void drawOval(int x, int y, int width, int height)
1076 throw new java.lang.UnsupportedOperationException ();
1079 public void drawRoundRect(int x, int y, int width, int height,
1080 int arcWidth, int arcHeight)
1082 throw new java.lang.UnsupportedOperationException ();
1085 public void drawString (String str, int x, int y)
1087 throw new java.lang.UnsupportedOperationException ();
1090 public void drawString (AttributedCharacterIterator ci, int x, int y)
1092 throw new java.lang.UnsupportedOperationException ();
1095 public void fillArc (int x, int y, int width, int height,
1096 int startAngle, int arcAngle)
1099 walkPath (new Arc2D.Double((double)x, (double)y,
1100 (double)width, (double)height,
1101 (double)startAngle, (double)arcAngle,
1102 Arc2D.PIE).getPathIterator (null));
1107 public void fillOval(int x, int y, int width, int height)
1109 throw new java.lang.UnsupportedOperationException ();
1112 public void fillRoundRect (int x, int y, int width, int height,
1113 int arcWidth, int arcHeight)
1115 throw new java.lang.UnsupportedOperationException ();
1118 public Font getFont ()
1120 throw new java.lang.UnsupportedOperationException ();
1123 public FontMetrics getFontMetrics ()
1125 throw new java.lang.UnsupportedOperationException ();
1128 public FontMetrics getFontMetrics (Font f)
1130 throw new java.lang.UnsupportedOperationException ();
1133 public void setFont (Font f)
1135 if (f instanceof GdkFont)
1138 font = new GdkFont (f.getAttributes ());
1141 public String toString()
1143 throw new java.lang.UnsupportedOperationException ();