static void setFillingGradient(int mode, int ramp, int fromColor, int toColor)
Throws:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
Parameter | Range | Description |
---|---|---|
mode | 0 ... 4 | gradient mode (see below) |
ramp | 0 ... max[width, height] | pixels until toColor is reached (0 = maximum) |
fromColor | 0x000000 ... 0xFFFFFF | color value at beginning of gradient |
toColor | 0x000000 ... 0xFFFFFF | color value at end of gradient |
Sets the active fill pattern to a gradient going from fromColor to toColor. All subsequent filling will be done with a gradient dependent on mode, which can be:
Mode | from red to blue | Description |
---|---|---|
GRADIENT_HORIZONTAL | ![]() |
ramp from left |
GRADIENT_VERTICAL | ![]() |
ramp from top |
GRADIENT_HORIZONTAL_SYMMETRICAL | ![]() |
ramp from left and right |
GRADIENT_VERTICAL_SYMMETRICAL | ![]() |
ramp from top and bottom |
GRADIENT_BUTTONIZED | ![]() |
ramp from all directions |
Note
Example
Attribute.setFillingGradient(Attribute.GRADIENT_BUTTONIZED, 20, 0xFFFFFF, 0x00FF00);
All future filling will be done with a gradient that fades from white to blue for 20 pixels in all directions. Filling an area with this pattern will give it a three-dimensional "buttonized" look.
See also:
Draw.fillDisplay()
Draw.fillDisplayArea(int, int)
Attribute.setFillingColor(int)
Attribute.setFillingTile(int)
Draw.drawRectangle(int, int, int)
Draw.drawStyledCircle(int, int)
Copyright © demmel products gmbh. All rights reserved.