Ejemplo n.º 1
0
        /// <summary>
        /// Get the element at the specified point. Usually this methods simply return the current element, but an element can return inner elements drawed inside the main elements.
        /// Returns a list of elements, where the last element is the upper element and the first element is the background element.
        /// </summary>
        /// <param name="measure"></param>
        /// <param name="area"></param>
        /// <param name="point"></param>
        /// <returns></returns>
        public virtual VisualElementList GetElementsAtPoint(MeasureHelper measure, System.Drawing.RectangleF area, PointF point)
        {
            VisualElementList list = new VisualElementList();

            if (GetDrawingArea(measure, area).Contains(point))
            {
                list.Add(this);
            }

            return(list);
        }
Ejemplo n.º 2
0
        public object Clone()
        {
            VisualElementList elements = new VisualElementList();

            foreach (IVisualElement element in this)
            {
                elements.Add((IVisualElement)element.Clone());
            }

            return(elements);
        }