Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Sets the color of the symbol layers of a CIMSymbol to a given value if the symbol layer is not color locked. more details | cimSymbolUtils | ||
Sets the rotation value of a CIMSymbol. more details | cimSymbolUtils | ||
Color | Returns the first color of the symbol layers in a CIMSymbol. more details | cimSymbolUtils | |
Number | Returns the rotation value of a CIMSymbol. more details | cimSymbolUtils | |
Number | Returns the size of a given CIMSymbol. more details | cimSymbolUtils | |
Scales the largest layer of a CIMSymbol to a given size. more details | cimSymbolUtils |
Method Details
-
applyCIMSymbolColor(symbol, color, options)
-
Sets the color of the symbol layers of a CIMSymbol to a given value if the symbol layer is not color locked.
Parameterssymbol CIMSymbolThe CIMSymbol to set the color on.
color ColorThe desired color value for the symbol.
options ObjectoptionalSince 4.23 The options for setting the color of the CIMSymbol.
SpecificationlayersToColor StringoptionalThe symbol layers to apply the color to. This only applies to CIMPolygonSymbols and CIMPointSymbols with embedded polygon marker graphics. The
"fill"
option will only apply the color to the fill symbol layers - CIMSolidFill, CIMHatchFill, CIMPictureFill, etc. The"outline"
option will only apply the color to the stroke symbol layers - like CIMSolidStroke and CIMPictureStroke. The"fill-and-outline"
option will apply the color to both fill and stroke layers. The default value is"fill"
.Possible Values:"fill"|"outline"|"fill-and-outline"
-
applyCIMSymbolRotation(symbol, rotation, clockwise)
-
Sets the rotation value of a CIMSymbol.
Parameterssymbol CIMSymbolThe CIMSymbol to set the rotation on.
rotation NumberThe desired rotation of the symbol in degrees.
clockwise BooleanoptionalIndicates whether to rotate the symbol clockwise. Default is
false
.
-
getCIMSymbolColor(symbol){Color}
-
Returns the first color of the symbol layers in a CIMSymbol.
Parametersymbol CIMSymbolThe CIMSymbol from which to get the color.
ReturnsType Description Color Returns the color of the CIMSymbol.
-
getCIMSymbolRotation(symbol, clockwise){Number}
-
Returns the rotation value of a CIMSymbol.
Parameterssymbol CIMSymbolThe CIMSymbol from which to get the rotation.
clockwise BooleanoptionalIndicates whether to get the rotation value as clockwise rotation. Default is
false
.ReturnsType Description Number The rotation value of the symbol in degrees.
-
getCIMSymbolSize(symbol){Number}
-
Returns the size of a given CIMSymbol. The size of a CIMSymbol is defined as the size of the largest symbol layer.
Parametersymbol CIMSymbolThe CIMSymbol from which to get the size.
ReturnsType Description Number Returns the size of the symbol in pixels.
-
scaleCIMSymbolTo(symbol, size, options)
-
Scales the largest layer of a CIMSymbol to a given size. The other symbol layers will scale accordingly.
Parameterssymbol CIMSymbolThe CIMSymbol to scale.
size NumberThe desired size for the symbol.
options ObjectoptionalOptions for scaling the symbol.
SpecificationpreserveOutlineWidth BooleanoptionalWhen
true
, this property will preserve the outline width of the symbol. This property will only work whenscaleSymbolsProportionally
isfalse
on the symbol layer. IfscaleSymbolsProportionally
istrue
, this property will be ignored.