Inherits ScriptObject.
Public Member Functions | |
| ToolRenderer () | |
| setSegment (Integer segment) | |
| setBackgroundColor (Color color) | |
| setFluteColor (Color color) | |
| setShoulderColor (Color color) | |
| setShaftColor (Color color) | |
| setHolderColor (Color color) | |
| exportAs (String path, String mimetype, Tool tool, Number width, Number height) | |
| String | getAsBinary (String mimetype, Tool tool, Number width, Number height) |
Tool to image converter.
| ToolRenderer | ( | ) |
Initializes the tool renderer.
Exports the tool image to the specified path.
| path | The destination path. |
| mimetype | The MIME type of the image (must be "image/png"). |
| tool | The tool to render. |
| width | The width of the image. |
| height | The height of the image. |
Exports the tool image to a binary string.
| mimetype | The MIME type of the image (must be "image/png"). |
| tool | The tool to render. |
| width | The width of the image. |
| height | The height of the image. |
| setBackgroundColor | ( | Color | color | ) |
Sets the background color.
| setFluteColor | ( | Color | color | ) |
Sets the color of the flute.
| setHolderColor | ( | Color | color | ) |
Sets the color of the holder.
| setSegment | ( | Integer | segment | ) |
Sets the tool segments to render.
| segment | The segment which can be TOOL_FLUTE, TOOL_SHOULDER, or TOOL_SHAFT. |
| setShaftColor | ( | Color | color | ) |
Sets the color of the shaft.
| setShoulderColor | ( | Color | color | ) |
Sets the color of the shoulder.