User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_shape.create_tgis_shape_tgis_bytes_boolean_tgis_uid_tgis_layervector

Table of Contents

TGIS_Shape.TGIS_Shape(TGIS_Shape, TGIS_Bytes, bool, long, TGIS_LayerVector) constructor

DK for .NET | TatukGIS.NDK.TGIS_Shape.Create | Overloads | Constructors | Fields | Methods | Properties

Create a 2D shape instance from an existing shape or from raw internal geometry data.

Available also on: Java.

Syntax

// C#
public TGIS_Shape(
  TGIS_Shape _source,
  TGIS_Bytes _ptr,
  bool _mapped,
  long _uid,
  TGIS_LayerVector _layer
);
' VisualBasic
Public Sub New(
  ByVal _source As TGIS_Shape,
  ByVal _ptr As TGIS_Bytes,
  ByVal _mapped As Boolean,
  ByVal _uid As Long,
  ByVal _layer As TGIS_LayerVector
)
// Oxygene
public
  constructor (
    _source : TGIS_Shape;
    _ptr : TGIS_Bytes;
    _mapped : Boolean;
    _uid : TGIS_Uid;
    _layer : TGIS_LayerVector
  );

Parameters

Name Type Description
_source TGIS_Shape Source shape to clone or use as a template. If assigned, _ptr, _mapped, _uid, and _layer are ignored.
_ptr TGIS_Bytes Pointer or platform-specific buffer containing internal shape geometry data.
_mapped bool
Boolean
True if _ptr references memory-mapped data; False if it references regular in-memory data.
_uid long
TGIS_Uid
Unique identifier assigned to the shape.
_layer TGIS_LayerVector Vector layer that owns or provides context for the shape.

Remarks

For normal use,TGIS_LayerVector.CreateShape is recommended instead.

PURPOSE: Create a 2D shape using an existing shape template or internal geometry storage supplied by the vector-layer framework.

BEHAVIOR: Initializes the shape and delegates setup toRecreate. The constructor can either clone from _source or bind the shape to raw geometry data, UID, and layer context.

CONSTRAINTS: Intended mainly for internal or advanced use. When _ptr is used, the caller is responsible for providing valid data compatible with the shape implementation.

Example

This is a simple procedure showing how to add a shape to the layer.

2026/07/11 01:10

Page Tools