DK11 for Delphi | GisEditor.TGIS_Editor.CreateShape | Overloads | Constructors | Methods | Properties | Events
Create and activate editing of a new shape.
Implements IGIS_Editor.CreateShape.
// Delphi public procedure CreateShape( const _layer : TGIS_LayerAbstract; const _ptg : TGIS_Point3D; const _type : TGIS_ShapeType ); overload;
// C++ Builder public: void CreateShape( TGIS_LayerAbstract* const _layer, TGIS_Point3D* const _ptg, TGIS_ShapeType* const _type ) /* overload */;
Name | Type | Description |
---|---|---|
_layer | TGIS_LayerAbstract | TGIS_Layer which will own new shape |
_ptg | TGIS_Point3D | "starting" 3D of a new shape to be created; expected Viewer coordinate system |
_type | TGIS_ShapeType | type of shape to be created; it must be type supported by layer; if TGIS_DimensionType.Unknown then shape of default type will be created |
var editLayer : TGIS_LayerAbstract ; GIS : TGIS_ViewerWnd; ptg : TGIS_Point3D ; begin // Edit mode. if GIS.Mode = TGIS_ViewerMode.Edit then begin // If no layer is selected, then exit. if editLayer = nil then exit ; else begin // No shape is selected but we are in edit mode. // So the user wants to create a new shape. GIS.Editor.CreateShape( editLayer, ptg, TGIS_ShapeType.Unknown ) ; // Select a layer to snap to or nil to not use snapping. GIS.Editor.SnapLayer := nil ; editLayer := nil ; end ; end