-
Notifications
You must be signed in to change notification settings - Fork 433
Description
When drawing images using a rotated graphics, the edge pixels are rendered incorrectly, apparently
due to the underlying sampling algorithm. I'll attach an image with a sample. This occurs across
all platforms, it's apparently just a hole in java's rendering algorithm. This is mainly a problem when
the images in question are transparent at the edges, so the expectation is that the edges do not draw.
In the un-rotated case, I paper over this problem by clipping the destination so the dirty pixels are
outside the clipping region. If the image is to be drawn rotated, this is not possible. On java desktops,
I avoid problems in the rotated case by drawing a region inside the source image (normally by 1 pixel)
so there is a real pixel outside the intended source which can be sampled.
The correct solution to this problem would be if the graphics engine provided a user-specified value
to be used for nonexistant pixels the sampling algorithm tries to sample. Short of that, codename1
could support the "8 argument" version of drawImage that regular java includes.
public void drawImage(Image im0,
int dx,int dy,int dx2,int dy2,
int fx,int fy,int fx2,int fy2)
