TsgDXFEntity.GetBoxPoints

TsgDXFEntity

  Classes Reference > CAD Database structure > Entities > TsgDXFEntity > TsgDXFEntity Methods >

TsgDXFEntity.GetBoxPoints

TsgDXFEntity

Previous pageReturn to chapter overviewNext page

Used in drawing cycle for fast checking whether the entity must be drawn

function GetBoxPoints(Proc: TFPointProc; Full: Boolean): Boolean; virtual;

Description

This function must call the Proc procedure with all "box" points needed  for this checking. The Full parameter specifies a full (Full=True) or  reduced (Full=False) checking. (Reduced checking is allowed when the local coordinates are transformed to global without any rotation).

By default, TsgDXFEntity.GetBoxPoints receives the entity box from GetBox  function and then passes to Proc 2 box points (TopLeft and BottomRight)  if Full=False, or all 8 box vertices if Full=True. Entities can override this method to implement more effective algorithm; for example,  TsgDXFLine.GetBoxPoints ignores the Full parameter and always passes to  Proc only two own points.

GetBoxPoints returns True if all points passed to Proc are REAL entity  points, such as for LINE, POINT and some other entities. By default, GetBoxPoints returns False; for example, the box of INSERT entity is the common box of its block.

There is no need to call this function directly; TsgCADImage.Draw calls it automatically for each entity.

Go to CAD VCL Enterprise