|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.gui.image.SubpixAA
public class SubpixAA
Scales an image down and applies Subpixel antialiasing to it.
| Field Summary | |
|---|---|
static java.lang.Object |
HBGR
|
static java.lang.Object |
HRGB
|
static java.lang.Object |
VBGR
|
static java.lang.Object |
VRGB
|
| Constructor Summary | |
|---|---|
SubpixAA()
|
|
| Method Summary | |
|---|---|
static void |
aa(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst,
java.lang.Object m)
Scales down an image using the specified antialiasing method. |
static void |
aaHBGR(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Scales down an image using HBGR antia-aliasing. |
static void |
aaHRGB(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Scales down an image using HRGB antia-aliasing. |
static void |
aaVBGR(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Scales down an image using VBGR antia-aliasing. |
static void |
aaVRGB(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Scales down an image using VRGB antia-aliasing. |
void |
drawAA(java.awt.Graphics gr,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Renders an image with subpixel antialiasing. |
void |
drawAA(java.awt.Graphics gr,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height,
java.lang.Object method,
java.awt.image.ImageObserver observer)
Renders an image with subpixel antialiasing. |
static java.awt.Dimension |
getSourceDimension(int width,
int height,
java.lang.Object method)
Returns the dimensions needed of the source image for the desired destination image size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object HBGR
public static final java.lang.Object VBGR
public static final java.lang.Object HRGB
public static final java.lang.Object VRGB
| Constructor Detail |
|---|
public SubpixAA()
| Method Detail |
|---|
public void drawAA(java.awt.Graphics gr,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
public void drawAA(java.awt.Graphics gr,
java.awt.image.BufferedImage img,
int x,
int y,
int width,
int height,
java.lang.Object method,
java.awt.image.ImageObserver observer)
public static java.awt.Dimension getSourceDimension(int width,
int height,
java.lang.Object method)
width - The desired width of the destination image.height - The desired height of the destination image.method - The Antialiasing method to be used must be one of
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB, ..._HBGR,
public static void aa(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst,
java.lang.Object m)
For methods HBGR and HRGB, the image width is scaled down
by factor 3.
For methods VBGR and VRGB, the image height is scaled down
by factor 3.
src - The source image.dst - The destination image.m - The method.
public static void aaHRGB(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Source and destination image must be of type BufferedImage.TYPE_RGB and have a data buffer of type DataBufferInt.
The height of source and destination image must be the same. The width of the source image must be 3 times the width of the destination image.
Intensity weights:
1
|
+----+----+
| | |
1/3 1/3 1/3
|
+----+----+----+----+
| | | | |
1/9 2/9 3/9 2/9 1/9
src - The source image.dst - The destination image.
public static void aaHBGR(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Source and destination image must be of type BufferedImage.TYPE_RGB and have a data buffer of type DataBufferInt.
The height of source and destination image must be the same. The width of the source image must be 3 times the width of the destination image.
Intensity weights:
1
|
+----+----+
| | |
1/3 1/3 1/3
|
+----+----+----+----+
| | | | |
1/9 2/9 3/9 2/9 1/9
src - The source image.dst - The destination image.
public static void aaVRGB(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Source and destination image must be of type BufferedImage.TYPE_RGB and have a data buffer of type DataBufferInt.
The width of source and destination image must be the same. The height of the source image must be 3 times the height of the destination image.
Intensity weights:
1
|
+----+----+
| | |
1/3 1/3 1/3
|
+----+----+----+----+
| | | | |
1/9 2/9 3/9 2/9 1/9
src - The source image.dst - The destination image.
public static void aaVBGR(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
Source and destination image must be of type BufferedImage.TYPE_RGB and have a data buffer of type DataBufferInt.
The width of source and destination image must be the same. The height of the source image must be 3 times the height of the destination image.
Intensity weights:
1
|
+----+----+
| | |
1/3 1/3 1/3
|
+----+----+----+----+
| | | | |
1/9 2/9 3/9 2/9 1/9
src - The source image.dst - The destination image.
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||