VS:SetClFillBack: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
<def> | <def> | ||
<funcDef lang="vs"> | <funcDef lang="vs"> | ||
PROCEDURE SetClFillBack(className:STRING; | PROCEDURE SetClFillBack(className:STRING; r,g,b:LONGINT); | ||
</funcDef> | </funcDef> | ||
<funcDef lang="py"> | <funcDef lang="py"> | ||
def vs.SetClFillBack(className, | def vs.SetClFillBack(className, r,g,b): | ||
return None | return None | ||
</funcDef> | </funcDef> | ||
Line 30: | Line 30: | ||
color | color | ||
LONGINT | LONGINT | ||
RGB color value. | RGB color value. In Python, the RGB value must be passed in as tuple. See the example below. | ||
</line> | </line> | ||
</lineList> | </lineList> | ||
Line 47: | Line 47: | ||
==== Python ==== | ==== Python ==== | ||
<code lang="py"> | <code lang="py"> | ||
cRed,cGrn,cBlu = ColorIndexToRGB(98) | |||
SetClFillBack('Grassy Cover',(cRed,cGrn,cBlu)) | |||
# or work with the tuple result directy | |||
clr = ColorIndexToRGB(98) | |||
SetClFillBack('Grassy Cover', clr) | |||
</code> | </code> | ||
</sample> | </sample> |
Latest revision as of 13:49, 26 April 2023
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Sets the fill background color of the specified class. The color must be specified using the RGB components of the desired color. RGB values are in the range of 0~65535.
PROCEDURE SetClFillBack(
className :STRING;
r,g,b :LONGINT);
def vs.SetClFillBack(className, r,g,b): return None
Parameters
className STRING Name of class. color LONGINT RGB color value. In Python, the RGB value must be passed in as tuple. See the example below.
Remarks
Changes the fill background color setting of the class named className.
Example
VectorScript
ColorIndexToRGB(98,cRed,cGrn,cBlu); SetClFillBack('Grassy Cover',cRed,cGrn,cBlu);
Python
cRed,cGrn,cBlu = ColorIndexToRGB(98) SetClFillBack('Grassy Cover',(cRed,cGrn,cBlu)) # or work with the tuple result directy clr = ColorIndexToRGB(98) SetClFillBack('Grassy Cover', clr)
Version
Availability: from VectorWorks8.0