VS:GetPenBack: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
mNo edit summary |
||
Line 6: | Line 6: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<desc> | <desc> | ||
Procedure GetPenBack returns the pen background color of the referenced object. RGB values are in the range of 0~65535.</desc> | Procedure GetPenBack returns the pen (pattern) background color of the referenced object. RGB values are in the range of 0~65535. | ||
</desc> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
Line 61: | Line 62: | ||
==== Python ==== | ==== Python ==== | ||
<code lang="py"> | <code lang="py"> | ||
def | def example(): | ||
h = vs.FSActLayer() | h = vs.FSActLayer() | ||
r, g, b = vs.GetPenBack(h) | r, g, b = vs.GetPenBack(h) | ||
vs.Message('r= ', r, ' g= ', g, ' b= ', b) | vs.Message('r= ', r, ' g= ', g, ' b= ', b) | ||
example() | |||
</code> | </code> | ||
</sample> | </sample> | ||
Line 72: | Line 73: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<seeAlso> | <seeAlso> | ||
VS Functions: | VS Functions: [[VS:RGBToColorIndex]] | [[VS:ColorIndexToRGB]] | [[VS:GetFillFore]] | [[VS:GetFillBack]] | [[VS:GetPenFore]] | ||
[[VS:RGBToColorIndex]] | |||
| [[VS:ColorIndexToRGB]] | |||
</seeAlso> | </seeAlso> | ||
Latest revision as of 11:13, 14 October 2021
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Procedure GetPenBack returns the pen (pattern) background color of the referenced object. RGB values are in the range of 0~65535.
PROCEDURE GetPenBack(
h :HANDLE;
VAR red :LONGINT;
VAR green :LONGINT;
VAR blue :LONGINT);
def vs.GetPenBack(h): return (red, green, blue)
Parameters
h HANDLE Handle to object. red LONGINT Returns RGB color component value. green LONGINT Returns RGB color component value. blue LONGINT Returns RGB color component value.
Example
VectorScript
PROCEDURE Example; VAR h :HANDLE; r, g, b :LONGINT; BEGIN h := FSActLayer; GetPenBack(h, r, g, b); Message('r= ', r, ' g= ', g, ' b= ', b); END; RUN(Example);
Python
def example(): h = vs.FSActLayer() r, g, b = vs.GetPenBack(h) vs.Message('r= ', r, ' g= ', g, ' b= ', b) example()
Version
See Also
VS Functions: VS:RGBToColorIndex | VS:ColorIndexToRGB | VS:GetFillFore | VS:GetFillBack | VS:GetPenFore
VS Functions: [[VS:RGBToColorIndex]] | [[VS:ColorIndexToRGB]] | [[VS:GetFillFore]] | [[VS:GetFillBack]] | [[VS:GetPenFore]]