status of java2d-on-cairo

graydon hoare graydon@redhat.com
Thu Aug 28 16:19:00 GMT 2003


hi,

I wanted to let people know about the status of my native java2d work.
this is visual work and a picture tells at least 1024 words:

http://people.redhat.com/graydon/native-java2d-aug28-2003.png

that is not using any sun code, it's all free software. now some
qualifications:

- most of the rendering there is being done in GDK and cairo, a C
  library (http://www.cairographics.org), and not in java. subsequently 
  the structure of the work so far is not as open to tinkering on
  the java-side of the JNI as the java2d APIs might imply. 

- the text API of cairo is not complete, so there is no text rendering
  support yet. the dark gray box in that screenshot is the bounding
  box for some glyph-converted text (via pango), but I cannot render
  it. when rendering is available it will be through xft (or other
  low level backends, such as win32 GDI, as needed)

- several of the java2d drawing functions are a bit ambiguous in
  specification, so the way they work might not be what you expect.
  feel free to correct.

- several drawing functions are incomplete, either in my code or in
  cairo or both. many overloads in the Graphics2D object are missing,
  and a few cairo APIs are unfinished or missing. both are free
  software though, and can be fleshed out.

- the draw cycle supports conventional AWT offscreen Image-based
  double buffering, but sometimes this appears to play less than
  perfectly with the GDK event queue, and gets slightly jerky in its
  response to update requests. I don't know exactly how this is
  happening yet.

in total there's about 140k of code in 9 new files, plus a handful of
little patches around and about. I can post it to the list, or break
it up into lots of separate little patches, or post it to a URL for
reading.. whatever is preferred. comments?

-graydon



More information about the Java mailing list