Skip to content

Latest commit

 

History

History
87 lines (72 loc) · 2.69 KB

File metadata and controls

87 lines (72 loc) · 2.69 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.

Examples

if arcLineH <> NIl then GetPenFore( arcLineH, red, green, blue ) ELSE GetPenFore( arrowLineH, red, green, blue );
SetPenFore( CNH, red, green, blue );}
{set Callout PenBack from the TextNote Group PenBack}
if arcLineH <> NIl then GetPenBack( arcLineH, red, green, blue ) ELSE GetPenBack( arrowLineH, red, green, blue );
SetPenBack( CNH, red, green, blue );

BEGIN
GetPenBack(ActiveParmHand,colorR, colorG, colorB);
SetPenBack(h,colorR, colorG, colorB);
GetPenFore(ActiveParmHand,colorR, colorG, colorB);
SetPenFore(h,colorR, colorG, colorB);
END;

GetClPenBack( kModifierClass, cR, cG, cB );
SetPenBack( h4, cR, cG, cB );
GetClPenFore( kModifierClass, cR, cG, cB );
SetPenFore( h4, cR, cG, cB );
SetFPat(h4, 0);
colorR, colorG, colorB = vs.GetPenBack( gObjHandle )
vs.SetPenBack( hTmpHand, ( colorR, colorG, colorB ) )

vs.SetFillBack(objH, vs.GetFillBack(parentH))
vs.SetFillFore(objH, vs.GetFillFore(parentH))
vs.SetPenBack(objH, vs.GetPenBack(parentH))
vs.SetPenFore(objH, vs.GetPenFore(parentH))
start, end, style, size	= vs.GetMarker(parentH)
vs.SetMarker(objH, start, end, style, size)
vs.SetOpacity(objH, vs.GetOpacity(parentH))

See Also

VS Functions: RGBToColorIndex | ColorIndexToRGB

Version

Availability: from All Versions

Category