如何在java中使边界框的图像不可见

时间:2021-06-27 22:59:19

I want to hard code an oval image and use it as a sprite in a pong ball example I've been following online, on a j2me platform.

我想硬编码椭圆形图像并将其用作乒乓球示例中的精灵我一直在线上,在j2me平台上。

I'm able to draw the oval image, but I want to make the bounding box of the image invisible or the same as the canvas' colour?

我能够绘制椭圆形图像,但我想使图像的边界框不可见或与画布的颜色相同?

Any Ideas???

1 个解决方案

#1


You could create oval image with pixels outside the oval transparent using createRGBImage(...) where you supply array of ARGB values for every pixel in the image.

您可以使用createRGBImage(...)创建椭圆透明外的像素的椭圆形图像,其中您为图像中的每个像素提供ARGB值数组。

#1


You could create oval image with pixels outside the oval transparent using createRGBImage(...) where you supply array of ARGB values for every pixel in the image.

您可以使用createRGBImage(...)创建椭圆透明外的像素的椭圆形图像,其中您为图像中的每个像素提供ARGB值数组。