org.utgenome.gwt.utgb.server.util.graphic
Class GraphicUtil

java.lang.Object
  extended by org.utgenome.gwt.utgb.server.util.graphic.GraphicUtil

public class GraphicUtil
extends Object

Utilities for manipulating Graphics in Java

Author:
leo

Constructor Summary
GraphicUtil()
           
 
Method Summary
static Graphics2D getGraphics(BufferedImage bufferedImage)
           
static BufferedImage getTransparentBufferedImage(int width, int height)
          Generates a BufferedImage instance whose background is transparent.
static Color parseColor(String colorCodeStr)
           
static Color parseColor(String colorCodeStr, int alpha)
           
static void writeImage(BufferedImage image, String imageType, javax.servlet.http.HttpServletResponse response)
          Output the given BufferedImage to the servlet response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicUtil

public GraphicUtil()
Method Detail

getTransparentBufferedImage

public static BufferedImage getTransparentBufferedImage(int width,
                                                        int height)
Generates a BufferedImage instance whose background is transparent.

Parameters:
width -
height -
Returns:
a BufferedImage

getGraphics

public static Graphics2D getGraphics(BufferedImage bufferedImage)

writeImage

public static void writeImage(BufferedImage image,
                              String imageType,
                              javax.servlet.http.HttpServletResponse response)
                       throws IOException
Output the given BufferedImage to the servlet response.

Parameters:
image -
imageType -
response -
Throws:
IOException

parseColor

public static Color parseColor(String colorCodeStr)

parseColor

public static Color parseColor(String colorCodeStr,
                               int alpha)


Copyright © 2007-2012 utgenome.org. All Rights Reserved.