DK11 for Delphi | GisLayerVector.TGIS_LayerVector.RevertShapes | Constructors | Fields | Methods | Properties | Events
Reverts all shapes to their original state.
// Delphi public procedure RevertShapes; virtual;
// C++ Builder public: virtual void RevertShapes(void);
Use this method to revert all shapes to their file based original state. All unsaved shapes will be deleted and changes not applied. See RevertAll.
procedure MyClass.MakeBuffer(); var ll : TGIS_LayerVector ; lb : TGIS_LayerVector ; shp : TGIS_Shape ; tmp : TGIS_Shape ; buf : TGIS_Shape ; tpl : TGIS_Topology ; begin // find buffer for vistual river ll := TGIS_LayerVector( GIS.Get( 'rivers' ) ) ; if not assigned( ll ) then exit ; lb := TGIS_LayerVector( GIS.Get( 'buffer' ) ) ; if not assigned( lb ) then exit ; shp := ll.FindFirst ( GisWholeWorld, 'name=''Wisla''' ); if not assigned( shp ) then exit ; tpl := TGIS_Topology.Create ; try lb.RevertShapes ; tmp := tpl.MakeBuffer( shp, 1000 ) ; if assigned( tmp ) then begin buf := lb.AddShape( tmp ) ; tmp.Free ; end else buf := nil ; finally FreeObject( tpl ) ; end ; // recalculate and refresh layer extent ll.RecalcExtent ; lb.RecalcExtent ; GIS.RecalcExtent ; GIS.Update; end;
}