public class NemaImageGenerator extends java.lang.Object implements ImageGenerator
ImageGenerator.Command, ImageGenerator.FillRule, ImageGenerator.Format| Constructor and Description |
|---|
NemaImageGenerator(ImageGenerator.Format format)
Creates the vector image generator that encodes the image in the Nema GPU compatible format.
|
| 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).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewByteBufferpublic NemaImageGenerator(ImageGenerator.Format format)
format - the path buffer output format expected by the application; this format is not used and the output
format is always ImageGenerator.Format.VG_FP32.public int encodeCommand(ImageGenerator.Command command)
ImageGeneratorImageGenerator.CommandencodeCommand in interface ImageGeneratorcommand - the command to convert.public int encodeColor(java.awt.Color color,
float opacity)
ImageGeneratorColor and an opacity.encodeColor in interface ImageGeneratorcolor - the color to convert.opacity - the opacity to apply, a value between 0f and 1f.public byte[] encodePath(Path path)
ImageGenerator
The Path.encode(PathData) method should be used to browse the commands of the path. These commands are
encoded by ImageGenerator.encodeCommand(Command) and append to the associated path data.
encodePath in interface ImageGeneratorpath - the path to encodepublic byte[] encodeGradient(LinearGradient gradient)
ImageGeneratorencodeGradient in interface ImageGeneratorgradient - the gradient to encode