| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean[] |
arrBinaryColor |
protected int[] |
arrIntColor |
protected int |
b |
protected Color |
color |
static int |
COLOR_MODEL_BINARY |
static int |
COLOR_MODEL_RGB |
protected int |
colorModel |
protected String |
formatName |
protected int |
g |
protected BufferedImage |
image |
protected int |
numComponents |
static int |
PROPORTIONAL |
protected int |
r |
protected int |
rgb |
| 构造器和说明 |
|---|
MarvinImage()
Creates an image with just 1x1 resolution.
|
MarvinImage(BufferedImage img)
Constructor using a image in memory
|
MarvinImage(BufferedImage img,
String fmtName)
Constructor using a image in memory
|
MarvinImage(int w,
int h)
Constructor to blank image, passing the size of image
|
MarvinImage(int w,
int h,
int cm) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
allocColorArray() |
int |
boundRGB(int rgb) |
void |
clear() |
void |
clear(int color) |
MarvinImage |
clone()
Clones the
MarvinImage |
protected static void |
copyBinaryColorArray(MarvinImage imgSource,
MarvinImage imgDestine) |
static void |
copyColorArray(MarvinImage imgSource,
MarvinImage imgDestine) |
protected static void |
copyIntColorArray(MarvinImage imgSource,
MarvinImage imgDestine) |
void |
drawLine(int x0,
int y0,
int x1,
int y1,
Color c)
Bresenham愀 Line Drawing implementation
|
void |
drawRect(int x,
int y,
int w,
int h,
Color c)
Draws a rectangle in the image.
|
void |
drawRect(int x,
int y,
int w,
int h,
int length,
Color c) |
boolean |
equals(Object obj)
Compare two MarvinImage objects
|
void |
fillRect(int x,
int y,
int w,
int h,
Color c)
Fills a rectangle in the image.
|
void |
fillRectBinaryt(int x,
int y,
int w,
int h,
boolean value)
Fills a rectangle in a binary image
|
int |
getAlphaComponent(int x,
int y) |
boolean |
getBinaryColor(int x,
int y) |
boolean[] |
getBinaryColorArray() |
BufferedImage |
getBufferedImage() |
BufferedImage |
getBufferedImage(int width,
int height)
Resize and return the image passing the new height and width
|
BufferedImage |
getBufferedImage(int width,
int height,
int type)
Resize and return the image passing the new height and width, but maintains width/height factor
|
BufferedImage |
getBufferedImageNoAlpha() |
int |
getColorModel() |
int |
getComponents() |
String |
getFormatName() |
int |
getHeight()
Returns the height
|
int |
getIntColor(int x,
int y)
Gets the integer color composition for x, y position
|
int[] |
getIntColorArray() |
int |
getIntComponent0(int x,
int y)
Gets the integer color component 0 in the x and y position
|
int |
getIntComponent1(int x,
int y)
Gets the integer color component 1 in the x and y position
|
int |
getIntComponent2(int x,
int y)
Gets the integer color component 2 in the x and y position
|
BufferedImage |
getNewImageInstance()
Return a new instance of the BufferedImage
|
int |
getType()
Gets the type
|
int |
getWidth()
Returns the width
|
boolean |
isValidPosition(int x,
int y) |
int |
limit8bitsColor(int color)
Limits the color value between 0 and 255.
|
double |
multi8p(int x,
int y,
double masc)
Multiple of gradient windwos per masc relation of x y
|
int[] |
Multi8p(int x,
int y,
int[][] masc)
Convolution operator
|
void |
resize(int w,
int h)
Resize the image passing the new height and width
|
void |
setAlphaComponent(int x,
int y,
int alpha) |
void |
setAlphaToColor(int color)
Set pixels having alpha == 0 to an a given color.
|
void |
setBinaryColor(int x,
int y,
boolean value) |
void |
setBufferedImage(BufferedImage img)
Sets a new image
|
void |
setColorModel(int cm) |
void |
setColorToAlpha(int alpha,
int color)
Set alpha to 0 for a given color
|
void |
setDimension(int w,
int h) |
void |
setIntColor(int x,
int y,
int color)
Sets the integer color composition in X an Y position
|
void |
setIntColor(int x,
int y,
int alpha,
int color) |
void |
setIntColor(int x,
int y,
int c0,
int c1,
int c2)
Sets the integer color in X an Y position
|
void |
setIntColor(int x,
int y,
int alpha,
int c0,
int c1,
int c2)
Sets the integer color in X an Y position
|
void |
setIntColorArray(int[] arr)
Set the integer color array for the entire image.
|
MarvinImage |
subimage(int x,
int y,
int width,
int height) |
void |
update() |
void |
updateColorArray() |
public static final int COLOR_MODEL_RGB
public static final int COLOR_MODEL_BINARY
public static final int PROPORTIONAL
protected BufferedImage image
protected int[] arrIntColor
protected boolean[] arrBinaryColor
protected int rgb
protected int r
protected int b
protected int g
protected Color color
protected int colorModel
protected String formatName
protected int numComponents
public MarvinImage()
public MarvinImage(BufferedImage img)
img - Imagepublic MarvinImage(BufferedImage img, String fmtName)
img - ImagefmtName - Image format namepublic MarvinImage(int w,
int h)
int - widthint - heightpublic MarvinImage(int w,
int h,
int cm)
public int getComponents()
public MarvinImage subimage(int x, int y, int width, int height)
public void updateColorArray()
public void update()
public void clear()
public void clear(int color)
public int getType()
public int getColorModel()
public void setColorModel(int cm)
public String getFormatName()
public void setDimension(int w,
int h)
public void allocColorArray()
public int[] getIntColorArray()
public void setIntColorArray(int[] arr)
public static void copyColorArray(MarvinImage imgSource, MarvinImage imgDestine)
protected static void copyIntColorArray(MarvinImage imgSource, MarvinImage imgDestine)
protected static void copyBinaryColorArray(MarvinImage imgSource, MarvinImage imgDestine)
public boolean[] getBinaryColorArray()
public boolean getBinaryColor(int x,
int y)
public void setBinaryColor(int x,
int y,
boolean value)
public int getIntColor(int x,
int y)
int - xint - ypublic void setAlphaComponent(int x,
int y,
int alpha)
x - y - alpha - public int getAlphaComponent(int x,
int y)
x - y - public int getIntComponent0(int x,
int y)
int - xint - ypublic int getIntComponent1(int x,
int y)
int - xint - ypublic int getIntComponent2(int x,
int y)
int - xint - ypublic int getWidth()
public int getHeight()
public boolean isValidPosition(int x,
int y)
public void setIntColor(int x,
int y,
int alpha,
int color)
public void setIntColor(int x,
int y,
int color)
x - positiony - positioncolor - color valuepublic void setIntColor(int x,
int y,
int c0,
int c1,
int c2)
x - positiony - positionc0 - component 0c1 - component 1c2 - component 2public void setIntColor(int x,
int y,
int alpha,
int c0,
int c1,
int c2)
x - positiony - positionc0 - component 0c1 - component 1c2 - component 2public void setBufferedImage(BufferedImage img)
BufferedImage - imagempublic BufferedImage getBufferedImage()
public BufferedImage getBufferedImageNoAlpha()
public int limit8bitsColor(int color)
public int[] Multi8p(int x,
int y,
int[][] masc)
public BufferedImage getNewImageInstance()
public BufferedImage getBufferedImage(int width, int height)
height - width - public BufferedImage getBufferedImage(int width, int height, int type)
height - width - public void resize(int w,
int h)
height - width - public MarvinImage clone()
MarvinImagepublic double multi8p(int x,
int y,
double masc)
public int boundRGB(int rgb)
public void drawLine(int x0,
int y0,
int x1,
int y1,
Color c)
public void drawRect(int x,
int y,
int w,
int h,
Color c)
x - rect愀 start position in x-axisy - rect愀 start positioj in y-axisw - rect愀 widthh - rect愀 heightc - rect愀 colorpublic void drawRect(int x,
int y,
int w,
int h,
int length,
Color c)
public void fillRectBinaryt(int x,
int y,
int w,
int h,
boolean value)
x - y - w - h - value - public void fillRect(int x,
int y,
int w,
int h,
Color c)
x - rect愀 start position in x-axisy - rect愀 start positioj in y-axisw - rect愀 widthh - rect愀 heightc - rect愀 colorpublic void setColorToAlpha(int alpha,
int color)
color - target colorpublic void setAlphaToColor(int color)
color - Copyright © 2018. All rights reserved.