Example #1
0
        private static void VerificarRetangulo(RectangleF frame, SizeF size)
        {
            if (frame.IsNegative())
            {
                throw new ArgumentException("O retângulo não é válido.", "frame");
            }

            if (frame.Y + frame.Height > size.Height ||
              frame.X + frame.Width > size.Width)
            {
                throw new ArgumentException("O retângulo esta posicionado fora da área desenhável.", "frame");
            }
        }