Example #1
0
 public MultiLineColumnSetting(MultiLineColumnSetting rhs)
 {
     _column    = rhs._column;
     _startRow  = rhs._startRow;
     _endRow    = rhs._endRow;
     _startX    = rhs._startX;
     _width     = rhs._width;
     _anchor    = rhs._anchor;
     _textColor = rhs._textColor;
     _textAlign = rhs._textAlign;
 }
Example #2
0
        private Rectangle GetRectangleFromSetting(MultiLineColumnScheme scheme,
                                                  MultiLineColumnSetting setting, int indent)
        {
            if (setting.Column.IsIndentColumn())
            {
                return(new Rectangle(0, _topMargin, indent, _rowHeight));
            }

            int baseWidth  = scheme.BaseWidth;
            int deltaWidth = _visibleWidth - baseWidth - indent;
            int startX     = setting.StartX + indent;
            int width      = setting.Width;

            if ((setting.Anchor & ColumnAnchor.Left) == 0)
            {
                startX += deltaWidth;
            }
            if ((setting.Anchor & (ColumnAnchor.Left | ColumnAnchor.Right)) == (ColumnAnchor.Left | ColumnAnchor.Right))
            {
                width += deltaWidth;
            }
            return(new Rectangle(startX, _topMargin + setting.StartRow * _rowHeight,
                                 width, (setting.EndRow - setting.StartRow + 1) * _rowHeight));
        }