[PATCH] enable Graphics2D at configure and runtime
graydon hoare
graydon@redhat.com
Wed Dec 17 14:41:00 GMT 2003
hi,
this patch provides a new bit of configury (--enable-gtk-cairo) and a
runtime system property ("gnu.java.awt.peer.gtk.Graphics" == "Graphics"
or "Graphics2D") which permits the cairo/graphics2d code I've been
working on to coexist with the existing GTK peers and GDK Graphics
object, as an option at both compile and runtime.
I'm sure there'll be a few suggestions about how "best" to do this, so I
just picked what seemed like an unintrusive method and implemented it,
to make sure it's even possible. any suggestions on how to do it better?
if not, is it ok to apply?
(asking both classpath and gcj here, though the patch is against gcj
configury, I'd port it to classpath pretty much directly)
-graydon
2003-12-16 Graydon Hoare <graydon@redhat.com>
* configure.in: Add --enable-gtk-cairo check.
* Makefile.am: Conditionally link against cairo.
* gnu/java/awt/peer/gtk/GtkToolkit.java (useGraphics2D): New method.
(getFontMetrics, getClasspathFontPeer):
* gnu/java/awt/peer/gtk/GtkCanvasPeer.java (getGraphics):
* gnu/java/awt/peer/gtk/GtkComponentPeer.java (createImage):
* gnu/java/awt/peer/gtk/GtkContainerPeer.java (getGraphics):
* gnu/java/awt/peer/gtk/GtkFramePeer.java (getGraphics):
Switch behavior depending on GtkToolkit.useGraphics2D().
* gnu/java/awt/peer/gtk/GtkFontPeer.java: Extend ClasspathFontPeer.
* java/awt/Font.java: Switch to peer model.
* jni/gtk-peer/gtkcairopeer.h: Definitions of cairo stuff.
* jni/gtk-peer/gdkfont.h: Include gtkcairopeer.h.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: Include
gtkcairopeer.h.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c:
Un-include gtkpeer.h.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: j2d-enable-graphics2d.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20031217/85bbf25e/attachment.ksh>
More information about the Java-patches
mailing list