Esempio n. 1
0
        public LinePos[] GetRectLinePos(int startRowIdx, int startColIdx, int endRowIdx, int endColIdx)
        {
            RectangleF rect = GetRect(startRowIdx, startColIdx, endRowIdx, endColIdx);

            LinePos[] linePosList = new LinePos[4];

            //
            LinePos linePos = new LinePos();

            linePos.start  = new PointF(rect.Left, rect.Top);
            linePos.end    = new PointF(rect.Left, rect.Bottom);
            linePosList[0] = linePos;

            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Left, rect.Top);
            linePos.end    = new PointF(rect.Right, rect.Top);
            linePosList[1] = linePos;

            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Right, rect.Top);
            linePos.end    = new PointF(rect.Right, rect.Bottom);
            linePosList[2] = linePos;


            //
            linePos        = new LinePos();
            linePos.start  = new PointF(rect.Left, rect.Bottom);
            linePos.end    = new PointF(rect.Right, rect.Bottom);
            linePosList[3] = linePos;

            return(linePosList);
        }
Esempio n. 2
0
        public LinePos GetColContentLinePos(int colIdx)
        {
            RectangleF rect = GetCellContentRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Right, rect.Top);
            PointF  end     = new PointF(rect.Right, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
Esempio n. 3
0
        public LinePos GetColLinePos(int colIdx)
        {
            RectangleF rect = GetCellRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Right, rect.Top);
            PointF  end     = new PointF(rect.Right, rect.Top + tbHeight);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
Esempio n. 4
0
        public LinePos GetRowLinePos(int rowIdx)
        {
            RectangleF rect = GetCellRect(rowIdx, 0);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Left, rect.Bottom);
            PointF  end     = new PointF(rect.Left + tbWidth, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
Esempio n. 5
0
        public LinePos GetRowContentLinePos(int rowIdx)
        {
            CellCoord  cellCoord = new CellCoord(rowIdx, 0);
            RectangleF rect      = GetCellContentRect(cellCoord);

            LinePos linePos = new LinePos();
            PointF  start   = new PointF(rect.Left, rect.Bottom);
            PointF  end     = new PointF(rect.Right, rect.Bottom);

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
Esempio n. 6
0
        public LinePos GetColLinePos(int colIdx, DirectionMode dir = DirectionMode.BOTTOM_OR_RIGHT)
        {
            RectangleF rect = GetOriginalCellRect(0, colIdx);

            LinePos linePos = new LinePos();
            PointF  start, end;

            if (dir == DirectionMode.UP_OR_LEFT)
            {
                start = new PointF(rect.Left, rect.Top);
                end   = new PointF(rect.Left, rect.Top + tbHeight);
            }
            else
            {
                start = new PointF(rect.Right, rect.Top);
                end   = new PointF(rect.Right, rect.Top + tbHeight);
            }

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }
Esempio n. 7
0
        public LinePos GetRowLinePos(int rowIdx, DirectionMode dir = DirectionMode.BOTTOM_OR_RIGHT)
        {
            RectangleF rect = GetOriginalCellRect(rowIdx, 0);

            LinePos linePos = new LinePos();
            PointF  start, end;

            if (dir == DirectionMode.UP_OR_LEFT)
            {
                start = new PointF(rect.Left, rect.Top);
                end   = new PointF(rect.Left + tbWidth, rect.Top);
            }
            else
            {
                start = new PointF(rect.Left, rect.Bottom);
                end   = new PointF(rect.Left + tbWidth, rect.Bottom);
            }

            linePos.start = start;
            linePos.end   = end;
            return(linePos);
        }