[cp-patches] RFC: The big Java2D cleanup

Sven de Marothy sven at physto.se
Sun May 28 19:02:39 UTC 2006


Hello all,
So here it is, the big cleanup of GdkGraphics2D, which is no more.
Summary of changes: Methods not needing to be in Graphics2D were moved
to their respective classes.
CairoGraphics2D now implements Graphics2D on an arbitrary cairo_t.

CairoSurface wraps a Cairo surface which can be used as a BufferedImage.

CairoSurfaceGraphics implements Graphics2D on that.

ComponentGraphics implements Graphics2D on component contexts.

BufferedImageGraphics implements it on BufferedImage contexts
(except BufferedImages which are CairoSurfaces).

The GdkPixmap (on-screen drawing) functionality of GtkImage has been
removed. GtkImage now only wraps a GdkPixbuf, and is still used here and
there.

Basically it's all abit simpler and cleaner. The main drawback is that
there are probably some lurking regressions, most notably I know there's
no ComponentGraphics implemented yet for non-xrender systems.

File modifications:
* gnu/java/awt/peer/gtk/BufferedImageGraphics.java
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
* gnu/java/awt/peer/gtk/CairoSurface.java
* gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java
* gnu/java/awt/peer/gtk/ComponentGraphics.java
* include/gnu_java_awt_peer_gtk_CairoGraphics2D.h
* include/gnu_java_awt_peer_gtk_CairoSurface.h
* include/gnu_java_awt_peer_gtk_ComponentGraphics.h
* native/jni/gtk-peer/cairographics2d.h
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
New files.

* gnu/java/awt/peer/gtk/GdkFontPeer.java
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
* gnu/java/awt/peer/gtk/GdkTextLayout.java
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
* gnu/java/awt/peer/gtk/GtkImage.java
* gnu/java/awt/print/JavaPrinterGraphics.java
* include/Makefile.am
* include/gnu_java_awt_peer_gtk_GdkFontPeer.h
* include/gnu_java_awt_peer_gtk_GdkTextLayout.h
* include/gnu_java_awt_peer_gtk_GtkImage.h
* native/jni/gtk-peer/Makefile.am
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
* native/jni/gtk-peer/gtkpeer.h
Modified.

* gnu/java/awt/peer/gtk/GdkGraphics2D.java
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
* include/gnu_java_awt_peer_gtk_GdkGraphics2D.h
Removed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphics2d.patch
Type: text/x-patch
Size: 43504 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/graphics2d-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BufferedImageGraphics.java
Type: text/x-java
Size: 5392 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/BufferedImageGraphics-0001.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CairoGraphics2D.java
Type: text/x-java
Size: 39228 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/CairoGraphics2D-0001.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CairoSurface.java
Type: text/x-java
Size: 5913 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/CairoSurface-0001.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CairoSurfaceGraphics.java
Type: text/x-java
Size: 3290 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/CairoSurfaceGraphics-0001.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ComponentGraphics.java
Type: text/x-java
Size: 5003 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/ComponentGraphics-0001.java
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_CairoGraphics2D.h
Type: text/x-chdr
Size: 3474 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_CairoGraphics2D-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_CairoSurface.h
Type: text/x-chdr
Size: 1303 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_CairoSurface-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_ComponentGraphics.h
Type: text/x-chdr
Size: 745 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_ComponentGraphics-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairographics2d.h
Type: text/x-chdr
Size: 3920 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/cairographics2d-0001.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_CairoGraphics2D.c
Type: text/x-csrc
Size: 22102 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_CairoGraphics2D-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_CairoSurface.c
Type: text/x-csrc
Size: 7927 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_CairoSurface-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_ComponentGraphics.c
Type: text/x-csrc
Size: 4192 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060528/af169d40/gnu_java_awt_peer_gtk_ComponentGraphics-0001.c


More information about the Classpath-patches mailing list