Direct3D transform artifacts
I have experimented with the new Direct3D flag for composting java2d. It is documented here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5104393. In most cases I would prefer to use the opengl acceleration by specifying -Dsun.java2d.opengl=true, however on machines that do not have opengl capability, like laptops and desktops built for office use, the video card often does not have an opengl driver.
I have found that on some machines (like a laptop with an Intel 815 chipset and DirectX 7) that when an image is drawn at a large size weird clipping artefacts appear.
My application has a JPanel in a JScrollPane in a JSplitPane in a JFrame. The paint component method includes:
Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
g2.scale((double) zoom, (double) zoom); g2.drawImage(img, 0, 0, null);
where img is a BufferedImage.TYPE_INT_ARGB.
When zoom is large (say over 5) and the img is also large (say 2000 x 2000 pixels) then it gets clipped diagonally at the corners when Direct3D is enabled (amonst other drawing errors). This does not happen on faster machines (such as my GForce 6600GT). It also does not happen when I do not use Direct3D or use the OpenGL acceleration.