예제 #1
0
        public void DrawCellLine(Point point, DrawInfo cellDrawInfo)
        {
            //表格内部线宽设固定值
            //Pen p = new Pen(Brushes.Black, 1.0f);
            Pen          p            = new Pen(cellDrawInfo.Brush, 1.0f);
            BoundaryLine boundaryLine = cellDrawInfo.BoundaryLine;
            int          x            = cellDrawInfo.Point.X + point.X;
            int          y            = cellDrawInfo.Point.Y + point.Y;
            int          height       = cellDrawInfo.Size.Height;
            int          width        = cellDrawInfo.Size.Width;

            if (boundaryLine.LeftBoundaryLine)
            {
                g.DrawLine(p, x, y, x, y + height);
#if DrawReportBoundaraLineSize
                if (updateBorderPoint)
                {
                    borderLine.UpdateLeftUpPoint(x, y);
                }
#endif
            }
            if (boundaryLine.RightBooundaryLine)
            {
                g.DrawLine(p, x + width, y, x + width, y + height);
#if DrawReportBoundaraLineSize
                if (updateBorderPoint)
                {
                    borderLine.UpdateRightDownPoint(x + width, y + height);
                }
#endif
            }

            if (boundaryLine.UpperBoundaryLine)
            {
                g.DrawLine(p, x, y, x + width, y);
            }
            if (boundaryLine.LowerBoundaryLine)
            {
                g.DrawLine(p, x, y + height, x + width, y + height);
            }

            //特殊线,正、反、十字线
            if (boundaryLine.IsSlash)
            {
                g.DrawLine(p, x, y + height, x + width, y);
            }
            if (boundaryLine.IsBackSlash)
            {
                g.DrawLine(p, x, y, x + width, y + height);
            }

            if (boundaryLine.IsCrossLine)
            {
                g.DrawLine(p, x, y, x + width, y + height);
                g.DrawLine(p, x, y + height, x + width, y);
            }
        }
예제 #2
0
        internal BoundaryLine Clone()
        {
            BoundaryLine obj = new BoundaryLine();

            obj.UpperBoundaryLine  = this.upperBoundaryLine;
            obj.LowerBoundaryLine  = this.lowerBoundaryLine;
            obj.LeftBoundaryLine   = this.leftBoundaryLine;
            obj.RightBooundaryLine = this.rightBooundaryLine;
            obj.IsSlash            = this.isSlash;
            obj.IsBackSlash        = this.isBackSlash;
            obj.IsCrossLine        = this.isCrossLine;
            return(obj);
        }