User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.addpart_void

Table of Contents



TGIS_Shape.AddPart method

DK for Delphi | GisLayerVector.TGIS_Shape.AddPart | Constructors | Fields | Methods | Properties

Starts a new part in the shape geometry.

Available also on: .NET | Java | ActiveX | Python.

Syntax

// Delphi
public
  procedure AddPart; virtual;
// C++ Builder
public:
  virtual void AddPart(void);

Remarks

PURPOSE: Separates connected components such as multipart lines, multipart polygons, or polygon rings.

BEHAVIOR: For non-empty multipart shapes, creates a new active part only when the current last part already contains at least one vertex; subsequent AddPoint calls append vertices to that part. For empty shapes, initializes the first part. Marks the shape geometry as modified.

USAGE: Start a polygon ring or a new multipart component before adding vertices.

shape.Lock(TGIS_Lock.Extent)
shape.AddPart()
shape.AddPoint(TGIS_Utils.GisPoint(10, 10))
shape.AddPoint(TGIS_Utils.GisPoint(10, 80))

CONSTRAINTS: Interpretation of parts depends on the concrete shape type.

References

2026/09/20 23:48

Page Tools