当前位置: 首页>>代码示例>>C#>>正文


C# Polygon.ClaimLabel方法代码示例

本文整理汇总了C#中Polygon.ClaimLabel方法的典型用法代码示例。如果您正苦于以下问题:C# Polygon.ClaimLabel方法的具体用法?C# Polygon.ClaimLabel怎么用?C# Polygon.ClaimLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Polygon的用法示例。


在下文中一共展示了Polygon.ClaimLabel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        /// <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();
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:29,代码来源:NewRowTextOperation.cs

示例2: Execute

        /// <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="pol">The polygon that the label falls inside. It should not already refer to a label.</param>
        /// <param name="height">The height of the text, in meters on the ground.</param>
        /// <param name="width">The width of the text, 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, Polygon pol,
            double height, double width, double rotation)
        {
            // Add the label.
            CadastralMapModel map = MapModel;
            TextFeature text = map.AddKeyLabel(this, polygonId, vtx, height, width, rotation);
            SetText(text);

            // Associate the polygon with the label, and vice versa.
            text.SetTopology(true);
            pol.ClaimLabel(text);

            Complete();
        }
开发者ID:steve-stanton,项目名称:backsight,代码行数:23,代码来源:NewKeyTextOperation.cs


注:本文中的Polygon.ClaimLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。