Exemple #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);
        }
Exemple #2
0
        /*  void RecalcAfterDeleted(bool AFirst, TPoint FPoint);
        *  void SetWSFlagEvent(TBaseWorkShape* WS);
        *  void RecalcBaseOffsetPosition();
        *  void RecalcFollowWorkShape(TBaseWorkShape* ABeforeInsertWork, TPoint AEndPoint);
        *  void RecalcAfterConverted(bool AFirst, TPoint FPoint);*/
        public TBaseWorkShape FindShapeFromCompositeWork(int AShapeID)
        {
            TBaseWorkShape TempWork;

            TempWork = g_PainterList.First();
            while (TempWork != null)
            {
                if (TempWork.CompositeWorkShape != null)
                {
                    if (TempWork.CompositeWorkShape.ContainedShape(AShapeID))
                    {
                        return(TempWork);
                    }
                }
                else
                {
                    if (TempWork.ShapeSupportID(AShapeID) != null)
                    {
                        return(TempWork);
                    }
                }
                TempWork = g_PainterList.Next();
            }
            return(null);
        }
Exemple #3
0
        /*     public TBaseWorkShape InsertWorkShape(int AType, TBaseWorkShape* AWBefore, int ACurrIDShape, int ACurrIDBlock, int ACurrIDLine);
         *   HRGN GetRegion(TBaseWorkShape* WS, int AOfs);*/
        public Point GetPointPolygon(int AXoffs = 0, int AYoffs = 0) //определение макисмальной точки полигона
        {
            Point          res  = new Point(0, 0);
            Rectangle      temp = new Rectangle(0, 0, 0, 0);
            TBaseWorkShape TempWork;

            TempWork = g_PainterList.First();
            while (TempWork != null)
            {
                temp = TempWork.GetMaxRect();
                if (temp.Right > res.X)
                {
                    res.X = temp.Right;
                }
                if (temp.Bottom > res.Y)
                {
                    res.Y = temp.Bottom;
                }
                TempWork = g_PainterList.Next();
            }
            res.X = res.X + AXoffs;
            res.Y = res.Y + AYoffs;
            return(res);
        }