public override List <PointDO> Values(ViewReckoner vr) { const int n = 100; List <PointDO> values = new List <PointDO>(); double arg = 0; for (int i = 0; i <= n; i++) { PointD p = new PointD( (double)_c0.X + ((double)_r) * Math.Cos(arg), (double)_c0.Y + ((double)_r) * Math.Sin(arg)); values.Add(new PointDO(vr.CToV(p))); arg += (2.0 * Math.PI) / (double)n; } return(values); }
private void OnMouseMove(object sender, MouseEventArgs e) { if (_band) { // clear previous band _bandImage.Clear(); // draw new band _bandImage.Graphics. DrawRectangle(new Pen(Color.Black, 1.0f), _mouseDownAt.X, _mouseDownAt.Y, e.Location.X - _mouseDownAt.X, e.Location.Y - _mouseDownAt.Y); DisplayImage(); } else { if (_mapper != null && _mapper.Selected) { // clear previous mapper _mapperImage.Clear(); // draw mapper in new position PlotterGraphics pg = new PlotterGraphics(_vr, _mapperImage.Graphics); Point offset = new Point(e.Location.X - _mouseMoveAt.X, e.Location.Y - _mouseMoveAt.Y); _mapper.Move(pg, offset); DisplayImage(); _mouseMoveAt = e.Location; if (_plotter != null) { _plotter.PlotPoints(_mapper.Values(_vr)); } } } if (_plotter != null) { _plotter.AtPoint(_vr.CToV(e.Location)); } }