示例#1
0
        /*      void PrepareLevelOnOffset();
         *    void ClearAltWSList();
         *    void AddToAltWSList(TBaseWorkShape* AWS);
         *    HRGN GetRGNAltWSList();
         *    bool IsAltWSListEmpty();*/
        TBaseShape FindTFE(int Ax, int Ay)
        {
            TBaseShape     CurrShape;
            TBaseWorkShape TempWork;

            TempWork = g_PainterList.First();
            while (TempWork != null)
            {
                if (TempWork.CompositeWorkShape != null)
                {
                    CurrShape = TempWork.CompositeWorkShape.FindTFE(Ax, Ay);
                    if (CurrShape != null)
                    {
                        return(CurrShape);
                    }
                }
                else
                {
                    for (int i = 0; i <= TempWork.WorkShapesCount - 1; i++)
                    {
                        CurrShape = (TBaseShape)(TempWork.GetWorkShape(i));
                        if (SharedConst.PtInRect(CurrShape.GetRect(), new Point(Ax, Ay)))
                        {
                            return(CurrShape);
                        }
                    }
                }
                TempWork = g_PainterList.Next();
            }
            return(null);
        }
示例#2
0
        public TBaseShape FindTFE(int Ax, int Ay)
        {
            TBaseShape Res = null;

            if (f_Shape != null)
            {
                if (SharedConst.PtInRect(f_Shape.GetRect(), new Point(Ax, Ay)))
                {
                    return(f_Shape);
                }
            }
            TCompositeBaseWork Item;

            for (int i = CompositeWork.Count - 1; i >= 0; i--)
            {
                Item = (TCompositeBaseWork)(CompositeWork.ElementAt(i));
                Res  = Item.FindTFE(Ax, Ay);
                if (Res != null)
                {
                    return(Res);
                }
            }
            return(null);
        }