ImageEn, unit iexLayers

TIELayer.ConvertToPolylineLayer

TIELayer.ConvertToPolylineLayer


Declaration

procedure ConvertToPolylineLayer(MakePolygon: Boolean = False);


Description

Changes the type of the current layer to TIEPolylineLayer. Only TIEShapeLayers, TIELineLayers, TIEAngleLayers and TIETextLayers can be converted.
if MakePolygon is enabled a line layer is imported as a closed rectangle (instead of a 2-point line) and an angle layer is imported as two closed rectangles (instead of a 3-point polyline).

Note:
For a TIETextLayer only the border shape is converted
If you try to convert a TIEImageLayer, an exception will be raised


Example

// Convert the current layer to a polyline, and allow the user to edit its points
ImageEnView1.CurrentLayer.ConvertToPolylineLayer();
ImageEnView1.MouseInteractLayers := [ mlEditLayerPoints ];