} // end of function void ShowCross(XYScatterPointInformation scatterPoint) { this._PlotIndex = scatterPoint.PlotIndex; this._RowIndex = scatterPoint.RowIndex; // convert this layer coordinates first to PrintableAreaCoordinates PointF printableCoord = _grac.GC.Layers[this._LayerNumber].LayerToGraphCoordinates(scatterPoint.LayerCoordinates); m_Cross = printableCoord; // m_Cross.X -= _grac.GraphViewOffset.X; // m_Cross.Y -= _grac.GraphViewOffset.Y; PointF newPixelCoord = _grac.WinFormsController.PrintableAreaToPixelCoordinates(printableCoord); //Cursor.Position = new Point((int)(Cursor.Position.X + newPixelCoord.X - mouseXY.X),(int)(Cursor.Position.Y + newPixelCoord.Y - mouseXY.Y)); //Cursor.Position = ((Control)_grac.View).PointToScreen(newPixelCoord); this.DisplayData(m_PlotItem,scatterPoint.RowIndex, m_PlotItem.XYColumnPlotData.XColumn[scatterPoint.RowIndex], m_PlotItem.XYColumnPlotData.YColumn[scatterPoint.RowIndex]); // here we shoud switch the bitmap cache mode on and link us with the AfterPaint event // of the grac _grac.WinFormsController.RepaintGraphArea(); // no refresh necessary, only invalidate to show the cross }
} // end of function private void ShowCross(XYScatterPointInformation scatterPoint) { this._PlotIndex = scatterPoint.PlotIndex; this._RowIndex = scatterPoint.RowIndex; // convert this layer coordinates first to PrintableAreaCoordinates var rootLayerCoord = _layer.TransformCoordinatesFromHereToRoot(scatterPoint.LayerCoordinates); _positionOfCrossInRootLayerCoordinates = rootLayerCoord; // m_Cross.X -= _grac.GraphViewOffset.X; // m_Cross.Y -= _grac.GraphViewOffset.Y; var newPixelCoord = _grac.ConvertGraphToMouseCoordinates(rootLayerCoord); //Cursor.Position = new Point((int)(Cursor.Position.X + newPixelCoord.X - mouseXY.X),(int)(Cursor.Position.Y + newPixelCoord.Y - mouseXY.Y)); //Cursor.Position = ((Control)_grac.View).PointToScreen(newPixelCoord); this.DisplayData(_PlotItem, scatterPoint.RowIndex, _PlotItem.XYColumnPlotData.XColumn[scatterPoint.RowIndex], _PlotItem.XYColumnPlotData.YColumn[scatterPoint.RowIndex]); // here we shoud switch the bitmap cache mode on and link us with the AfterPaint event // of the grac _grac.RenderOverlay(); // no refresh necessary, only invalidate to show the cross }