private bool IsOnDrawing(Metadata metadata, int activeKeyFrameIndex, PointF mouseCoordinates, long currentTimeStamp, bool allFrames) { if (metadata.Keyframes.Count == 0) { return(false); } bool bIsOnDrawing = false; DistortionHelper distorter = metadata.CalibrationHelper.DistortionHelper; if (allFrames && metadata.Keyframes.Count > 0) { int[] zOrder = metadata.GetKeyframesZOrder(currentTimeStamp); for (int i = 0; i < zOrder.Length; i++) { bIsOnDrawing = DrawingHitTest(metadata, zOrder[i], mouseCoordinates, currentTimeStamp, distorter, metadata.CoordinateSystem); if (bIsOnDrawing) { break; } } } else if (activeKeyFrameIndex >= 0) { bIsOnDrawing = DrawingHitTest(metadata, activeKeyFrameIndex, mouseCoordinates, metadata[activeKeyFrameIndex].Position, distorter, metadata.CoordinateSystem); } return(bIsOnDrawing); }
private bool IsOnDrawing(Metadata _Metadata, int _iActiveKeyFrameIndex, Point _MouseCoordinates, long _iCurrentTimeStamp, bool _bAllFrames) { bool bIsOnDrawing = false; if (_bAllFrames && _Metadata.Keyframes.Count > 0) { int[] zOrder = _Metadata.GetKeyframesZOrder(_iCurrentTimeStamp); for (int i = 0; i < zOrder.Length; i++) { bIsOnDrawing = DrawingHitTest(_Metadata, zOrder[i], _MouseCoordinates, _iCurrentTimeStamp); if (bIsOnDrawing) { break; } } } else if (_iActiveKeyFrameIndex >= 0) { bIsOnDrawing = DrawingHitTest(_Metadata, _iActiveKeyFrameIndex, _MouseCoordinates, _Metadata[_iActiveKeyFrameIndex].Position); } return(bIsOnDrawing); }