本文整理汇总了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();
}
示例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();
}