Public Member Functions | List of all members
ToolRenderer Class Reference

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)
 

Detailed Description

Tool to image converter.

Constructor & Destructor Documentation

◆ ToolRenderer()

Initializes the tool renderer.

Member Function Documentation

◆ exportAs()

exportAs ( String  path,
String  mimetype,
Tool  tool,
Number  width,
Number  height 
)

Exports the tool image to the specified path.

Parameters
pathThe destination path.
mimetypeThe MIME type of the image (must be "image/png").
toolThe tool to render.
widthThe width of the image.
heightThe height of the image.

◆ getAsBinary()

String getAsBinary ( String  mimetype,
Tool  tool,
Number  width,
Number  height 
)

Exports the tool image to a binary string.

Parameters
mimetypeThe MIME type of the image (must be "image/png").
toolThe tool to render.
widthThe width of the image.
heightThe height of the image.
Returns
Returns string with each byte represented as its own character.
Since
41349

◆ setBackgroundColor()

setBackgroundColor ( Color  color)

Sets the background color.

◆ setFluteColor()

setFluteColor ( Color  color)

Sets the color of the flute.

◆ setHolderColor()

setHolderColor ( Color  color)

Sets the color of the holder.

◆ setSegment()

setSegment ( Integer  segment)

Sets the tool segments to render.

Parameters
segmentThe segment which can be TOOL_FLUTE, TOOL_SHOULDER, or TOOL_SHAFT.

◆ setShaftColor()

setShaftColor ( Color  color)

Sets the color of the shaft.

◆ setShoulderColor()

setShoulderColor ( Color  color)

Sets the color of the shoulder.



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.