[PATCH] various graphics2d fixes

graydon hoare graydon@redhat.com
Tue Nov 18 18:41:00 GMT 2003


these are just miscellaneous fixes which have accumulated to the
graphics2d implementation I did atop cairo. nothing revolutionary,
just a lot of minor fixups, so I bundled them up here in one
patch. changes to other areas (eg. swing) will follow in separate

comments? ok to commit?


(patch is against gcj's libjava, but I'm also asking classpath because
 a similar one with pathnames altered is implied, for it)

2003-11-17  Graydon Hoare  <graydon@redhat.com>

	* gnu/java/awt/peer/gtk/GdkClasspathFontPeerMetrics.java: New file.
	* gnu/java/awt/peer/gtk/GdkClasspathFontPeer.java 
	(GdkFontLineMetrics): New inner class.
	(getLineMetrics): Return new GdkFontLineMetrics.
	(getFontMetrics): Return new GdkClasspathFontPeerMetrics.
	(layoutGlyphVector): Create GdkGlyphVector.
	* gnu/java/awt/peer/gtk/GdkGraphics2D.java (stateStack): New member.
	(GdkGraphics2D): Initialize state via mathod calls.
	(cairoSetMatrix, cairoShowGlyphs): Simplify native calls.
	(cairoTranslate, cairoScale, cairoRotate): Remove.
	(various methods): use setTransform for special transform cases.
	(DrawState): New inner class.
	(stateSave): New method.
	(stateRestore): New method.
	(various methods): use stateSave, stateRestore.
	(getClipInDevSpace): New method.
	(clip, clipRect, setClip, getClip, getClipBounds): 
	Follow spec more closely.
	(getTransform): Return clone of transform.
	(setStroke): Set linewidth to passed width / 2.0.
	(setPaintMode): Set SrcOver rather than Xor.
	(setColor): Set paint to passed color.
	(drawRaster, drawImage, PainterThread, drawPixels): Take affine
	transform from image to user space.
	(drawRenderedImage, drawRenderableImage): Implement.
	(getFontRenderContext, getFontMetrics, drawString, getFont): 
	(drawArc, drawOval, drawRoundRect, fillArc, fillOval, fillRoundRect): 
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c: 
	Match changes to java side.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeer.c: 
	Release resources.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGlyphVector.c: 
	Don't use pango for metrics.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c: 
	New file.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: GdkClasspathFontPeerMetrics.java
Type: application/octet-stream
Size: 3504 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20031118/407fa15e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnu_java_awt_peer_gtk_GdkClasspathFontPeerMetrics.c
Type: application/octet-stream
Size: 3448 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20031118/407fa15e/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: j2d-graphics2d-fixes-for-gcj.patch
Type: text/x-patch
Size: 45264 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20031118/407fa15e/attachment.bin>

More information about the Java mailing list