User Tools

Site Tools


api:dk11:delphi:gislayervector.tgis_shape.lock_tgis_lock

Table of Contents

TGIS_Shape.Lock method

DK11 for Delphi | GisLayerVector.TGIS_Shape.Lock | Constructors | Fields | Methods | Properties

Lock a shape.

Available also on: .NET | Java | ActiveX.

Syntax

// Delphi
public
  procedure Lock(
    const _lock : TGIS_Lock
  ); virtual;
// C++ Builder
public:
  virtual void Lock(
    TGIS_Lock* const _lock
  );

Parameters

Name Type Description
_lock TGIS_Lock TGIS_Lock.None - unlocked; TGIS_Lock.Extent - extent locked; TGIS_Lock.Projection - extent locked and projections turned off

Example

Delphi

procedure MyForm.FormCreate();
var
  shp : TGIS_Shape;
  lk : TGIS_LayerVector;
begin
  // let's create a new layer
  lk:=TGIS_LayerVector.Create;
  GIS.Add(lk);
 
  // let's create a new shape on our layer
  shp := lk.CreateShape( TGIS_ShapeType.Point ) ;
 
  // if successfully, let's lock, edit and unlock our shape
  if assigned( shp ) then begin
    shp.Lock( TGIS_Lock.Extent ) ;
    shp.AddPart ;
    shp.AddPoint( GisPoint( 3,3 ) ) ;
    shp.Params.Area.Color:=clBlack;
    shp.Unlock ;
  end;

References

2020/05/07 01:09