private BufferedImage create_POI_Image ( final int WIDTH ) { if ( WIDTH <= 0 ) { return null ; } final java . awt . image . BufferedImage IMAGE = UTIL . createImage ( WIDTH , WIDTH , java . awt . Transparency . TRANSLUCENT ) ; final java . awt . Graphics2D G2 = IMAGE . createGraphics ( ) ; G2 . setRenderingHint ( java . awt . RenderingHints . KEY_ANTIALIASING , java . awt . RenderingHints . VALUE_ANTIALIAS_ON ) ; //G2.setRenderingHint(java.awt.RenderingHints.KEY_RENDERING, java.awt.RenderingHints.VALUE_RENDER_QUALITY); //G2.setRenderingHint(java.awt.RenderingHints.KEY_DITHERING, java.awt.RenderingHints.VALUE_DITHER_ENABLE); //G2.setRenderingHint(java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, java.awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY); //G2.setRenderingHint(java.awt.RenderingHints.KEY_COLOR_RENDERING, java.awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY); G2 . setRenderingHint ( java . awt . RenderingHints . KEY_STROKE_CONTROL , java . awt . RenderingHints . VALUE_STROKE_NORMALIZE ) ; //G2.setRenderingHint(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON); final java . awt . geom . Ellipse2D BLIP = new java . awt . geom . Ellipse2D . Double ( 0 , 0 , WIDTH , WIDTH ) ; final java . awt . geom . Point2D CENTER = new java . awt . geom . Point2D . Double ( BLIP . getCenterX ( ) , BLIP . getCenterY ( ) ) ; final float [ ] FRACTIONS = { 0.0f , 1.0f } ; final Color [ ] COLORS = { new Color ( 1.0f , 1.0f , 1.0f , 0.9f ) , new Color ( 1.0f , 1.0f , 1.0f , 0.0f ) } ; final java . awt . RadialGradientPaint GRADIENT = new java . awt . RadialGradientPaint ( CENTER , ( int ) ( WIDTH / 2.0 ) , FRACTIONS , COLORS ) ; G2 . setPaint ( GRADIENT ) ; G2 . fill ( BLIP ) ; G2 . dispose ( ) ; return IMAGE ; }
Creates the image of the poi