User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_layervector.addshape_tgis_shape_boolean

TGIS_LayerVector.AddShape(TGIS_Shape; Boolean) method

DK11 for Delphi | GisLayerVector.TGIS_LayerVector.AddShape | Overloads | Constructors | Fields | Methods | Properties | Events

Adds a copy of shape and makes it editable.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  function AddShape(
    const _shape : TGIS_Shape;
    const _copyfield : Boolean
  ) : TGIS_Shape; overload;
// C++ Builder
public:
  TGIS_Shape* AddShape(
    TGIS_Shape* const _shape,
    const bool _copyfield
  ) /* overload */;

Parameters

Name Type Description
_shape TGIS_Shape shape to be added
_copyfield Boolean if True, then all fields will be copied (and created if necessary). Default value is False.

Result

Type Description
TGIS_Shape Created copy of shape or nil.

Remarks

Use this method to add a new copy of a shape. Depending on _copyfield param, the same field structure is copied to the new shape.

To add a shape, simply create a new shape, choose a layer to export it to, and use ImportLayer method with proper params.

This function creates a copy of a shape passed as a parameter.

References

2020/05/07 01:09

Page Tools