Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.54 KB

File metadata and controls

53 lines (42 loc) · 1.54 KB

SetPenBack

Description

Procedure SetPenBack sets the pen background color of the referenced object. RGB values are in the range of 0~65535.

PROCEDURE SetPenBack(
				h     : HANDLE;
				color : LONGINT);
def vs.SetPenBack(h, color):
    return None

Parameters

Name Type Description
h HANDLE Handle to object.
color LONGINT RGB color value.

Remarks

(_c_ 2015.05.18): This Vectorscript routine responds to multiple types of notations:

Vectorscript:

  • Singular color index: *: colorIndex := RGBToColorIndex(65535, 0, 0); *: SetPenBack(FSActLayer, colorIndex);
  • Three RGB longints: *: SetPenBack(FSActLayer, 65535, 0, 0);

Python:

  • Singular color index: *: vs.SetPenBack(vs.FSActLayer(), vs.RGBToColorIndex(65535, 0, 0))
  • Three longints in a tuple: *: vs.SetPenBack(vs.FSActLayer(), (65535, 0, 0))
  • Three hex numbers in a tuple: *: vs.SetPenBack(vs.FSActLayer(), (0xFFFF, 0, 0))

On Vectorlab there is a list of all color routines accepting multiple variable type, see: [http://www.vectorlab.info/index.php?title=Index_pitfalls#Colors Color Index]. ; Warning: SetPenBack, SetPenFore will remove the "ByClass" attribute of the FILL as well. Remember to parse for it and restore it.

See Also

VS Functions: RGBToColorIndex | ColorIndexToRGB

Version

Availability: from All Versions

Category