Documentation | Samples | ShapeOperations
How to move, rotate and scale any given shape.
A shape is copied into a temporary, top-most (CachedPaint=false) layer which, upon a shape transformation, is updated using InvalidateTopmost. Afer edition shape is copied back into the original shape, and a whole map is updated using InvalidateWholeMap.
This sample illustrates use of:
Name | Description |
---|---|
TGIS_Shape.Centroid | Calculate the central point of a shape. |
TGIS_Shape.Transform | Transform shape by provided matrix [_m11.._m33] and translation vector [_dx,_dy,-dz]. |
TGIS_Shape.CopyGeometry | Copy geometry. |
TGIS_Shape.CreateCopy | Create a copy of the current shape. |
TGIS_Layer.CachedPaint | False if layer must be painted directly (bypassing cache). |
TGIS_ViewerWnd.InvalidateTopmost | Invalidate only topmost layers. |
TGIS_viewerWnd.InvalidateWholeMap | Invalidate whole map. |
This sample is available on following platforms (click to see source code):