User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_layervector.createshape_tgis_shapetype_tgis_dimensiontype

TGIS_LayerVector.CreateShape(TGIS_ShapeType, TGIS_DimensionType) method

DK11 for .NET | TatukGIS.NDK.TGIS_LayerVector.CreateShape | Overloads | Constructors | Fields | Methods | Properties | Events

Create a new shape and make it editable

Available also on: Delphi | Java | ActiveX.

Syntax

// C#
public TGIS_Shape CreateShape(
  TGIS_ShapeType _type,
  TGIS_DimensionType _dim
);
' VisualBasic
Public Function CreateShape(
  ByVal _type As TGIS_ShapeType,
  ByVal _dim As TGIS_DimensionType
) As TGIS_Shape
// Oxygene
public
  function CreateShape(
    _type : TGIS_ShapeType;
    _dim : TGIS_DimensionType
  ) : TGIS_Shape;

Parameters

Name Type Description
_type TGIS_ShapeType type of shape to be created; it must be a type supported by the layer; if TGIS_ShapeType.Unknown, then the default shape type will be created
_dim TGIS_DimensionType dimension; it must be a type supported by the layer

Result

Type Description
TGIS_Shape Newly created shape or nil

Remarks

Use this method to create a new shape. Depending on _type param a different shape will be created. If the type is not supported by the layer, nil is returned, otherwise an editable shape.

To create a shape, simply create a new layer or choose existing one and use CreateShape method with a proper shape type as a param.

References

2018/02/17 00:26