/// <summary> /// 高度ビュークリック /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void pictureBoxAltitude_Click(object sender, EventArgs e) { if (coordinateList == null) { return; } Point pt = pictureBoxAltitude.PointToClient(new Point(MousePosition.X, MousePosition.Y)); currentIndex = altitudeView.OnClickAndReturnIndex(pt); Tuple <Coordinate, Coordinate> tpl = coordinateList.GetTupleAtIndex(currentIndex); heading = GpsCalculator.Heading(tpl.Item1, tpl.Item2); DrawStreetView(tpl.Item1); mapView.DrawCurrentPoint(currentIndex); }
public void DrawCurrentPoint(int index) { Tuple <Coordinate, Coordinate> tpl = coordinateList.GetTupleAtIndex(index); Bitmap newCanvas = new Bitmap(baseCanvas); using (Graphics g = Graphics.FromImage(newCanvas)) { Point pt = ConvertCoordinateToPixelPoint(tpl.Item1); g.FillEllipse(Brushes.Red, pt.X - PointSize / 2, pt.Y - PointSize / 2, PointSize, PointSize); } pictureBoxMap.Image = newCanvas; }