DK11 for Delphi | GisTopology.TGIS_Topology.ClearShape | Overloads | Constructors | Methods | Properties | Events
Make a copy of the shape with removal of redundant (overlapped) points.
// Delphi public function ClearShape( const _shp : TGIS_Shape; const _returnnewobj : Boolean ) : TGIS_Shape; overload;
// C++ Builder public: TGIS_Shape* ClearShape( TGIS_Shape* const _shp, const bool _returnnewobj ) /* overload */;
Name | Type | Description |
---|---|---|
_shp | TGIS_Shape | shape to be copied |
_returnnewobj | Boolean | if True, then result will be returned in a newly created object; if False, then self object will be returned |
Type | Description |
---|---|
TGIS_Shape | returns copy of shape without redundant points |
var topologyObj : TGIS_Topology ; GIS: TGIS_ViewerWnd; procedure MyClass.Clear(); var tmp : TGIS_Shape ; begin if GIS.Items.Count=0 then exit ; // let's get first shape tmp:= TGIS_LayerVector(GIS.Items[0]).GetShape(1) ; if not assigned( tmp ) then exit ; // make a clear copy and change some shape attributes tmp := tmp.MakeEditable ; tmp := topologyObj.ClearShape(tmp2) ; tmp.Params.Area.Color := clBlack ; tmp.SetPosition( tmp2.Centroid, TGIS_LayerVector(GIS.Items[0]), 10 ) ; GIS.Update; end;