1

Are there any in-built methods, or flags I can set, with a Java Graphics2D object such that I can draw polygons or other shapes with gaussian blur automatically applied?

Or if anyone knows of a computationally efficient shortcut/hack, that would be greatly appreciated.

4

1 回答 1

1

AFAIK - no.

Most blur operations operate on a BufferedImage as they need to manipulate the underlying pixel data. A typical approach is to render the content to an image, blur it, then paint that to whatever you want

I prefer to use JHLabs filters generally, there not the fastest, but generally give a high quality result.

This example is a little involved, but demonstrates the basic idea.

As another example and if your really want to make your eyes bleed ;)

于 2017-04-04T05:45:23.003 回答