Mittwoch, 14. Mai 2008

translucent images :)

After a long time reading and trying to understand and some time of hacking in the existing X11 sources, I finally got something cool to work: translucent images:

XRender makes it really easy, providing support for ARGB pixmaps, which is exactly what we need.
Well, cliping is now broken when rendering images (of course^^) but its the first stuff working now ... which could not be accalerated with X11 Core Rendering.
It first looked really weird because RENDER expects premultiplied data, but after changing the data-type for cached pixmaps to ARGBPre everything worked as expected :)

Although it first seems to be really complex and weird, the design of Java2D is quite clever and well thought.

I am quite interested how the existing code will handle stuff like:
  • Clipping
  • Complex tranformations
  • Text
  • Antialiasing
  • Solid rendering
As far as I understand if we don't want to composite to get clipping we have to do it ourself ... which is boring.
Transformations could mean simply adjusting the transformation matrix, well, I have to look at it.
Solid rendering means replacing all the existing primitive drawing operation with XRender's ... I guess this will look very much like the OpenGL pipeline directing anything but lines and simple fills to the generic path/fill code.

Keine Kommentare: