Pinta.HistogramWidget.CheckPoint C# (CSharp) Method

CheckPoint() private method

private CheckPoint ( Rectangle rect, PointD point ) : void
rect Rectangle
point PointD
return void
        private void CheckPoint(Rectangle rect, PointD point)
        {
            if (point.X < rect.X) {
                point.X = rect.X;
            } else if (point.X > rect.X + rect.Width) {
                point.X = rect.X + rect.Width;
            }

            if (point.Y < rect.Y) {
                point.Y = rect.Y;
            } else if (point.Y > rect.Y + rect.Height) {
                point.Y = rect.Y + rect.Height;
            }
        }