Code sample Home

Create a shape entity
void DemoShape (HANDLE hLcWnd)
{
  HANDLE hBlock, hEnt;
  // get a block, linked with CAD window
  hBlock = lcPropGetHandle( hLcWnd, LC_PROP_WND_BLOCK );
  // begin Shape entity
  lcBlockBeginShape( hBlock );
  // create entities that will be parts of Shape entity
  lcBlockAddCircle( hBlock, 10, 10, 5, false );
  lcBlockAddCircle( hBlock, 30, 10, 5, false );
  lcBlockAddRect2( hBlock, 0, 0, 40, 20, 5, false );
  // add Shape entity
  hEnt = lcBlockAddShape( hBlock );
  // set solid filling
  lcPropPutBool( hEnt, LC_PROP_ENT_SOLIDFILL, true );
  lcPropPutStr( hEnt, LC_PROP_ENT_FCOLOR, L"0,255,255" );
  // undate view
  lcBlockUpdate( hBlock, true, 0 );
  lcWndZoomRect( hLcWnd, -10, -10, 50, 30 );
}
This will create a drawing as shown on the picture below:



See Also:

Code sample 2
Code sample 3
Create a shape entity with hatch filling