Closes the object group.

syntaxSyntax:
FWiz2DImage.EndGroup()

Return Value

If an error occurs it returns false otherwise it returns true.

Example

See the TO-220 sample code for the complete script.

  Copy codeCopy code
function OnBuild2DImage()
{
  var A = FWiz.GetValue("A");
  var J1 = FWiz.GetValue("J1");
  var c = FWiz.GetValue("c");
  var E = FWiz.GetValue("E");
  var F = FWiz.GetValue("F");

  var ctx = FWiz.Get2DImageCtx();
  var rect = new DlxRect();
  var y = J1 + c / 2 - A / 2;

  // body
  ctx.SetPenStyle(0);
  ctx.SetBrushStyle(0);
  rect.SetRect(new DlxPoint(0,y), E, A);  
  ctx.BeginGroup("Body");
  ctx.DrawRectangle(rect);
  ctx.EndGroup();

  // tab
  ctx.SetBrushStyle(1);
  rect.bottom = rect.top - F;
  ctx.BeginGroup("Tab");
  ctx.DrawRectangle(rect);
  ctx.EndGroup();
}

See also