org.apache.batik.util.awt.image
Class GraphicsUtil
java.lang.Object
|
+--org.apache.batik.util.awt.image.GraphicsUtil
- public class GraphicsUtil
- extends java.lang.Object
Set of utility methods for Graphics.
These generally bypass broken methods in Java2D or provide tweaked
implementations.
Method Summary |
static java.awt.image.ColorModel |
coerceColorModel(java.awt.image.ColorModel cm,
boolean newAlphaPreMult)
|
static java.awt.image.ColorModel |
coerceData(java.awt.image.WritableRaster wr,
java.awt.image.ColorModel cm,
boolean newAlphaPreMult)
Coerces data within a bufferedImage to match newAlphaPreMult,
Note that this can not change the colormodel of bi so you |
static void |
copyData(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Copies data from one bufferedImage to another paying attention
to the state of AlphaPreMultiplied. |
protected static void |
divide_INT_PACK_Data(java.awt.image.WritableRaster wr)
|
static void |
drawImage(java.awt.Graphics2D g2d,
CachableRed cr)
|
static void |
drawImage(java.awt.Graphics2D g2d,
Filter filter)
|
static void |
drawImage(java.awt.Graphics2D g2d,
Filter filter,
java.awt.image.renderable.RenderContext rc)
|
static void |
drawImage(java.awt.Graphics2D g2d,
java.awt.image.RenderedImage ri)
|
protected static boolean |
is_INT_PACK_Data(java.awt.image.SampleModel sm)
|
static java.awt.image.ColorModel |
makeLinear_sRGBCM(boolean premult)
|
static java.awt.image.BufferedImage |
makeLinearBufferedImage(int width,
int height,
boolean premult)
|
protected static void |
mult_INT_PACK_Data(java.awt.image.WritableRaster wr)
|
static CachableRed |
wrap(java.awt.image.RenderedImage ri)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Linear_sRGB
public static final java.awt.image.ColorModel Linear_sRGB
Linear_sRGB_Pre
public static final java.awt.image.ColorModel Linear_sRGB_Pre
Linear_sRGB_Unpre
public static final java.awt.image.ColorModel Linear_sRGB_Unpre
GraphicsUtil
public GraphicsUtil()
drawImage
public static void drawImage(java.awt.Graphics2D g2d,
java.awt.image.RenderedImage ri)
drawImage
public static void drawImage(java.awt.Graphics2D g2d,
CachableRed cr)
drawImage
public static void drawImage(java.awt.Graphics2D g2d,
Filter filter,
java.awt.image.renderable.RenderContext rc)
drawImage
public static void drawImage(java.awt.Graphics2D g2d,
Filter filter)
makeLinear_sRGBCM
public static java.awt.image.ColorModel makeLinear_sRGBCM(boolean premult)
makeLinearBufferedImage
public static java.awt.image.BufferedImage makeLinearBufferedImage(int width,
int height,
boolean premult)
wrap
public static CachableRed wrap(java.awt.image.RenderedImage ri)
coerceColorModel
public static java.awt.image.ColorModel coerceColorModel(java.awt.image.ColorModel cm,
boolean newAlphaPreMult)
coerceData
public static java.awt.image.ColorModel coerceData(java.awt.image.WritableRaster wr,
java.awt.image.ColorModel cm,
boolean newAlphaPreMult)
- Coerces data within a bufferedImage to match newAlphaPreMult,
Note that this can not change the colormodel of bi so you
- Parameters:
wr
- The raster to change the state of.cm
- The colormodel currently associated with data in wr.newAlphaPreMult
- The desired state of alpha Premult for raster.- Returns:
- A new colormodel that matches newAlphaPreMult.
copyData
public static void copyData(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
- Copies data from one bufferedImage to another paying attention
to the state of AlphaPreMultiplied.
- Parameters:
src
- The source
is_INT_PACK_Data
protected static boolean is_INT_PACK_Data(java.awt.image.SampleModel sm)
divide_INT_PACK_Data
protected static void divide_INT_PACK_Data(java.awt.image.WritableRaster wr)
mult_INT_PACK_Data
protected static void mult_INT_PACK_Data(java.awt.image.WritableRaster wr)
Copyright © 2000 Apache Software Foundation. All Rights Reserved.