public interface ImageGenerator
The implementation of this class is required by the VEE Port. Two implementations are already provided: vglite and nema.
| Modifier and Type | Interface and Description |
|---|---|
static class |
ImageGenerator.Command
List of path commands.
|
static class |
ImageGenerator.FillRule
List of rules to fill a path.
|
static class |
ImageGenerator.Format
List of image's formats.
|
| Modifier and Type | Method and Description |
|---|---|
int |
encodeColor(java.awt.Color color,
float opacity)
Encodes the GPU color from a
Color and an opacity. |
int |
encodeCommand(ImageGenerator.Command command)
Encodes the GPU command from a
ImageGenerator.Command |
byte[] |
encodeGradient(LinearGradient gradient)
Encodes a linear gradient for the GPU.
|
byte[] |
encodePath(Path path)
Encodes a path for the GPU (path header + path commands + path commands parameters).
|
default java.nio.ByteBuffer |
newByteBuffer(int size)
Creates a byte buffer for the given size, ordered in little endian.
|
int encodeCommand(ImageGenerator.Command command)
ImageGenerator.Commandcommand - the command to convert.int encodeColor(java.awt.Color color,
float opacity)
Color and an opacity.color - the color to convert.opacity - the opacity to apply, a value between 0f and 1f.byte[] encodeGradient(LinearGradient gradient)
gradient - the gradient to encodebyte[] encodePath(Path path)
The Path.encode(PathData) method should be used to browse the commands of the path. These commands are
encoded by encodeCommand(Command) and append to the associated path data.
path - the path to encodedefault java.nio.ByteBuffer newByteBuffer(int size)
size - the byte buffer size