Skip to content

RFE: Support 8 argument drawImage method #3891

@ddyer0

Description

@ddyer0

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.

Image

public void drawImage(Image im0,
		int dx,int dy,int dx2,int dy2,
		int fx,int fy,int fx2,int fy2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions