Sets the pen style for the legend layer.
Syntax: |
---|
FWiz2DImage.SetPenStyle(penStyle = null) FWiz2DImage.SetPenStyle(styleIndex = -1) |
Parameters
Parameter | Description |
---|---|
penStyle | A DlxPenStyle object with the style of the pen. |
styleIndex | Index of the style. There are 10 styles available with indexes from 0 to 9. Specifying -1 sets the default style for the assembly layer. |
Return Value
If an error occurs it returns false otherwise it returns true.
Example
Copy code | |
---|---|
function OnBuild2DImage()
{
var ctx = FWiz.Get2DImageCtx();
var style = FWiz.GetPenStyle(0);
style.SetStyle("Marker pen blue");
ctx.SetPenStyle(0);
var vertices = new Array();
vertices[0] = new DlxPoint(-10,0);
vertices[1] = new DlxPoint(-5,10);
vertices[2] = new DlxPoint(0,0);
vertices[3] = new DlxPoint(5,-10);
vertices[4] = new DlxPoint(10,0);
ctx.DrawPolyline(vertices);
}
|