本文整理汇总了C#中Geometry.SetArc方法的典型用法代码示例。如果您正苦于以下问题:C# Geometry.SetArc方法的具体用法?C# Geometry.SetArc怎么用?C# Geometry.SetArc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geometry
的用法示例。
在下文中一共展示了Geometry.SetArc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawArc
/**
* 绘制弧线
*
* @return 折线对象
*/
public Graphic DrawArc()
{
double mLat = 39.97923;
double mLon = 116.357428;
int lat = (int)(mLat * 1E6);
int lon = (int)(mLon * 1E6);
GeoPoint pt1 = new GeoPoint(lat, lon);
mLat = 39.94923;
mLon = 116.397428;
lat = (int)(mLat * 1E6);
lon = (int)(mLon * 1E6);
GeoPoint pt2 = new GeoPoint(lat, lon);
mLat = 39.97923;
mLon = 116.437428;
lat = (int)(mLat * 1E6);
lon = (int)(mLon * 1E6);
GeoPoint pt3 = new GeoPoint(lat, lon);
Geometry arcGeometry = new Geometry();
arcGeometry.SetArc(pt1, pt3, pt2);
// 设定样式
Symbol arcSymbol = new Symbol();
Symbol.Color arcColor = new Com.Baidu.Mapapi.Map.Symbol.Color(arcSymbol);
arcColor.Red = 255;
arcColor.Green = 0;
arcColor.Blue = 225;
arcColor.Alpha = 255;
arcSymbol.SetLineSymbol(arcColor, 4);
// 生成Graphic对象
Graphic arcGraphic = new Graphic(arcGeometry, arcSymbol);
return arcGraphic;
}