Exemplo n.º 1
0
        public List <Shape> SelectShapeAt(int x, int y, int width, int height)
        {
            List <Shape> SelectedShapes = new List <Shape>();

            foreach (Shape SelectedShape in ShapesDrawn)
            {
                if (SelectedShape.Inside(x, y, width, height))
                {
                    SelectedShape.Select();
                    SelectedShapes.Add(SelectedShape);
                }
            }

            return(SelectedShapes);
        }
Exemplo n.º 2
0
        public override bool Inside(int xOuter, int yOuter, int WidthOuter, int HeightOuter)
        {
            int NumberofShape       = 0;
            int NumberofInsideShape = 0;

            foreach (Shape SelectedShape in GroupShape)
            {
                NumberofShape += 1;
                if (SelectedShape.Inside(xOuter, yOuter, WidthOuter, HeightOuter))
                {
                    NumberofInsideShape += 1;
                }
            }

            if (NumberofShape == NumberofInsideShape)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }