/// <summary> /// Executes the new label operation. /// </summary> /// <param name="vtx">The position of the new label.</param> /// <param name="polygonId">The ID and entity type to assign to the new label.</param> /// <param name="row">The data to use for creating a row for the new label.</param> /// <param name="atemplate">The template to use in creating the RowTextGeometry /// for the new label.</param> /// <param name="pol">The polygon that the label falls inside. It should not already /// refer to a label. Not null.</param> /// <param name="height">The height of the text, in meters on the ground.</param> /// <param name="width">The width of the new label, in meters on the ground.</param> /// <param name="rotation">The clockwise rotation of the text, in radians from the horizontal.</param> internal void Execute(IPosition vtx, IdHandle polygonId, DataRow row, ITemplate atemplate, Polygon pol, double height, double width, double rotation) { if (pol == null) { throw new ArgumentNullException(); } // Add the label. TextFeature text = MapModel.AddRowLabel(this, polygonId, vtx, row, atemplate, height, width, rotation); SetText(text); // Associate the polygon with the label, and vice versa. text.SetTopology(true); pol.ClaimLabel(text); Complete(); }