public class Animation extends Object
| Constructor and Description |
|---|
Animation() |
| Modifier and Type | Method and Description |
|---|---|
static void |
gradualBrightness(Device device,
int startValue,
int endValue,
int duration)
Gradually changes the display brightness.
|
static void |
scroll(Device device,
byte[] matrix,
int interval,
int iterations)
Scrolls the display from left to right (with spaces before and after text)
|
static void |
scroll(Device device,
byte[] matrix,
int interval,
int iterations,
int spaceBefore,
int spaceAfter)
Scrolls the display from left to right.
|
static void |
transitionHorizontally(Device device,
byte[] matrix1,
byte[] matrix2,
int interval) |
static void |
transitionVertically(Device device,
byte[] matrix1,
byte[] matrix2,
int interval) |
public static void gradualBrightness(Device device, int startValue, int endValue, int duration) throws IOException, InterruptedException
device - the devicestartValue - the brightness value to start at (0-128)endValue - the brightness value to end at (0-128)duration - the duration in milliseconds of the gradual changeIOException - if an error occursInterruptedException - if the thread is interruptedpublic static void scroll(Device device, byte[] matrix, int interval, int iterations, int spaceBefore, int spaceAfter) throws InterruptedException, IOException
device - the devicematrix - the pixel matrix containing the full displayinterval - the interval in milliseconds between consecutive scrolling stepsiterations - the number of times the entire scrolled display is repeated
(a negative value means indefinite scrolling)spaceBefore - the amount of space (empty columns) to add before the matrixspaceAfter - the amount of space (empty columns) to add after the matrixIOException - if an error occursInterruptedException - if the thread is interruptedpublic static void scroll(Device device, byte[] matrix, int interval, int iterations) throws InterruptedException, IOException
device - the devicematrix - the pixel matrix containing the full displayinterval - the interval in milliseconds between consecutive scrolling stepsiterations - the number of times the entire scrolled display is repeated
(a negative value means infinite iterations)IOException - if an error occursInterruptedException - if the thread is interruptedpublic static void transitionHorizontally(Device device, byte[] matrix1, byte[] matrix2, int interval) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void transitionVertically(Device device, byte[] matrix1, byte[] matrix2, int interval) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2017 freeutils.net. All rights reserved.