public void DrawItem(Radar radar, Graphics g) { PointF cp = radar.AzEl2XY(_azimuth, _elevation); PointF topLeft = new PointF(cp.X - ((float)_width / 2), cp.Y - ((float)_height / 2)); g.FillRectangle(new SolidBrush(radar.CustomLineColor), new RectangleF(topLeft, new SizeF((float)_width, (float)_height))); }
public void DrawItem(Radar radar, Graphics g) { PointF cp = radar.AzEl2XY(_azimuth, _elevation); PointF _topLeft = new PointF(cp.X - ((float)_width / 2), cp.Y - ((float)_height / 2)); PointF p1 = new PointF(((float)_topLeft.X + ((float)_width / 2F)), (float)_topLeft.Y); PointF p2 = new PointF((float)_topLeft.X, (float)_topLeft.Y + (float)_height); PointF p3 = new PointF((float)_topLeft.X + (float)_width, (float)_topLeft.Y + (float)_height); _gp = new GraphicsPath(FillMode.Winding); _gp.AddPolygon(new PointF[] { p1, p2, p3 }); g.FillPath(new SolidBrush(radar.CustomLineColor), _gp); }
public void DrawItem(Radar radar, Graphics g) { PointF cp = radar.AzEl2XY(_azimuth, _elevation); PointF topLeft = new PointF(cp.X - ((float)_width / 2), cp.Y - ((float)_height / 2)); g.FillEllipse(new SolidBrush(radar.CustomLineColor), new RectangleF(topLeft, new SizeF((float)_width, (float)_height))); }