public class JHelpGradient extends java.lang.Object implements JHelpPaint
Modifier and Type | Field and Description |
---|---|
private int |
alphaDownLeft
Alpha value of down left corner
|
private int |
alphaDownRight
Alpha value of down right corner
|
private int |
alphaUpLeft
Alpha value of up left corner
|
private int |
alphaUpRight
Alpha value of up right corner
|
private int |
blueDownLeft
Blue value of down left corner
|
private int |
blueDownRight
Blue value of down right corner
|
private int |
blueUpLeft
Blue value of up left corner
|
private int |
blueUpRight
Blue value of up right corner
|
private int |
greenDownLeft
Green value of down left corner
|
private int |
greenDownRight
Green value of down right corner
|
private int |
greenUpLeft
Green value of up left corner
|
private int |
greenUpRight
Green value of up right corner
|
private int |
height
Actual bounding box height
|
private int |
redDownLeft
Red value of down left corner
|
private int |
redDownRight
Red value of down right corner
|
private int |
redUpLeft
Red value of up left corner
|
private int |
redUpRight
Red value of up right corner
|
private int |
size
Actual bounding box area
|
private int |
width
Actual bounding box width
|
Constructor and Description |
---|
JHelpGradient(int upLeft,
int upRight,
int downLeft,
int downRight)
Create a new instance of JHelpGradient
|
Modifier and Type | Method and Description |
---|---|
int |
getColorDownLeft()
Down left corner color
|
int |
getColorDownRight()
Down right corner color
|
int |
getColorUpLeft()
Up left corner color
|
int |
getColorUpRight()
Up right corner color
|
void |
initializePaint(int width,
int height)
Initialize the paint before fill a shape
Parent documentation: Initialize the shape. |
int |
obtainColor(int x,
int y)
Compute the color for a pixel inside the shape to fill
Parent documentation: Compute color to use for a specific point. |
private final int alphaDownLeft
private final int alphaDownRight
private final int alphaUpLeft
private final int alphaUpRight
private final int blueDownLeft
private final int blueDownRight
private final int blueUpLeft
private final int blueUpRight
private final int greenDownLeft
private final int greenDownRight
private final int greenUpLeft
private final int greenUpRight
private int height
private final int redDownLeft
private final int redDownRight
private final int redUpLeft
private final int redUpRight
private int size
private int width
public JHelpGradient(int upLeft, int upRight, int downLeft, int downRight)
upLeft
- Up left corner colorupRight
- Up right corner colordownLeft
- Down left corner colordownRight
- Down right corner colorpublic int getColorDownLeft()
public int getColorDownRight()
public int getColorUpLeft()
public int getColorUpRight()
public void initializePaint(int width, int height)
initializePaint
in interface JHelpPaint
width
- Bounding box widthheight
- Bounding box heightJHelpPaint.initializePaint(int, int)
public int obtainColor(int x, int y)
obtainColor
in interface JHelpPaint
x
- Pixel's Xy
- Pixel's YJHelpPaint.obtainColor(int, int)