Code sample Home

Create a shape entity
void DemoShape2 (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
  lcBlockAddRect2( hBlock, 0, 0, 300, 180, 0, false );
  lcBlockAddArc( hBlock, 95, 90, 60, LC_DEG90, LC_DEG180 );
  lcBlockAddLine( hBlock, 95, 30, 255, 30 );
  lcBlockAddLine( hBlock, 255, 30, 255, 150 );
  lcBlockAddLine( hBlock, 255, 150, 95, 150 );
  // 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, 0, 0, 0, 0 );
}
This will create a drawing as shown on the picture below:



See Also:

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