public class SubpixAA extends Object
| Modifier and Type | Field and Description |
|---|---|
static Object |
HBGR |
static Object |
HRGB |
static Object |
VBGR |
static Object |
VRGB |
| Constructor and Description |
|---|
SubpixAA() |
| Modifier and Type | Method and Description |
|---|---|
static void |
aa(BufferedImage src,
BufferedImage dst,
Object m)
Scales down an image using the specified antialiasing method.
|
static void |
aaHBGR(BufferedImage src,
BufferedImage dst)
Scales down an image using HBGR antia-aliasing.
|
static void |
aaHRGB(BufferedImage src,
BufferedImage dst)
Scales down an image using HRGB antia-aliasing.
|
static void |
aaVBGR(BufferedImage src,
BufferedImage dst)
Scales down an image using VBGR antia-aliasing.
|
static void |
aaVRGB(BufferedImage src,
BufferedImage dst)
Scales down an image using VRGB antia-aliasing.
|
void |
drawAA(Graphics gr,
BufferedImage img,
int x,
int y,
int width,
int height,
ImageObserver observer)
Renders an image with subpixel antialiasing.
|
void |
drawAA(Graphics gr,
BufferedImage img,
int x,
int y,
int width,
int height,
Object method,
ImageObserver observer)
Renders an image with subpixel antialiasing.
|
static Dimension |
getSourceDimension(int width,
int height,
Object method)
Returns the dimensions needed of the source image for the desired
destination image size.
|
public static final Object HBGR
public static final Object VBGR
public static final Object HRGB
public static final Object VRGB
public void drawAA(Graphics gr, BufferedImage img, int x, int y, int width, int height, ImageObserver observer)
public void drawAA(Graphics gr, BufferedImage img, int x, int y, int width, int height, Object method, ImageObserver observer)
public static Dimension getSourceDimension(int width, int height, 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(BufferedImage src, BufferedImage dst, 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(BufferedImage src, 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(BufferedImage src, 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(BufferedImage src, 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(BufferedImage src, 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 © 2014. All Rights Reserved.