Assembly: VM.API.Post.Operations.dll A utility class that provides methods to convert string values to specific types.
Inheritance
object ← OperationAPIServiceExamples
For an example that includes information about interfaces, see this example. To view the examples, refer to the location of the ‘Install_Path\Motion\Document\Postprocessor API for Python.zip’ file.Methods
GetColorFrameRGB(int, int, int)
Converts the specified RGB values into a Color object.Parameters
r int
The red component of the color, ranging from 0 to 255.
g int
The green component of the color, ranging from 0 to 255.
b int
The blue component of the color, ranging from 0 to 255.
Returns
Color A Color object representing the color defined by the specified RGB values.Examples
For an example that includes this property, see the OperationAPIService.Remarks
This method takes integer values for the red, green, and blue components and converts them into a Color. Each parameter should be within the range of 0 to 255 to ensure valid color representation.GetColorFromHexCode(string)
Converts a hex color code to a Color.Parameters
color string
The hex color code string to be converted.
Returns
Color A Color that represents the converted color.Examples
For an example that includes this property, see the OperationAPIService.Remarks
This method converts a hex color code (e.g., “#FF5733”) to a Color.GetFontFaceFromString(string)
Converts a font face string to a FontFamily.Parameters
fontface string
The font face string to be converted.
Returns
FontFamily A FontFamily that represents the converted font face.Examples
For an example that includes this property, see the OperationAPIService.Remarks
This method converts a font face string (e.g., “Arial”) to a FontFamily.GetFontStyleFromString(string)
Converts a font style string to a FontStyle.Parameters
fontstyle string
The font style string to be converted (e.g., “Normal”, “Italic”, “Oblique”).
Returns
FontStyle A FontStyle that represents the converted font style.Examples
For an example that includes this property, see the OperationAPIService.Remarks
This method converts a font style string (e.g., “Normal”, “Italic”, “Oblique”) to a FontStyle.GetFontWeightFromString(string)
Converts a font weight string to a FontWeight.Parameters
fontweight string
The font weight string to be converted (e.g., “Normal”, “Bold”, “Thin”).