/// <summary> /// 中心角转离心角 /// </summary> /// <param name="av">中心角</param> /// <param name="ar">扇形所在椭圆辐射半径</param> /// <returns>离心角</returns> private double Ang2ecc(double av, GExtra ar) { double x = ar.Y * Math.Cos(av * Math.PI / 180), y = ar.X * Math.Sin(av * Math.PI / 180); { return(Math.Atan2(Math.Abs(y), x) * ( y < 0 ? -1 : 1 )); } }
public Rect() : base() { this.thick = 1; this.slope = 0; this.extra = null; this.point = null; this.style = GLinear.SOLID; this.stuff = Colors.Transparent; this.color = Color.FromRgb(255, 0, 0); }
/// <summary> /// 辐射地理范围转像素范围 /// </summary> /// <param name="ext"></param> /// <returns></returns> protected GExtra Fit4e(GExtra ext) { if (!MatchUtils.IsEmpty(ext)) { double d2m = this.Target.Netmap.Craft * WMaper.Units.M / this.Target.Netmap.Deg2sc(); { if (d2m > 0) { return(new GExtra(ext.X * d2m, ext.Y * d2m)); } } } return(new GExtra()); }