/// <summary> /// Initializes a new instance of the <see cref="RTFRowDefinition"/> struct. /// </summary> /// <param name="rowWidth">Width of the row.</param> /// <param name="alignment">The alignment.</param> /// <param name="rTFBorderSide">The RTFBorderSide.</param> /// <param name="borderWidth">Width of the border.</param> /// <param name="borderColor">Color of the border.</param> public RTFRowDefinition(int rowWidth, RTFAlignment alignment, RTFBorderSide rTFBorderSide, int borderWidth, Color borderColor, Padding padding) { this._padding = padding; this._alignment = alignment; this._rTFBorderSide = rTFBorderSide; this._borderWidth = borderWidth; this._borderColor = borderColor; this._rowWidth = rowWidth * RTFBuilder.TWIPSA4 / 100; }
public RTFCellDefinition(int cellwidth, RTFAlignment alignment, RTFBorderSide rTFBorderSide, int borderWidth, Color borderColor, Padding padding) { this._x = 0; this._padding = padding; this._alignment = alignment; this._rTFBorderSide = rTFBorderSide; this._borderWidth = borderWidth; this._borderColor = borderColor; this._cellWidth = (float) cellwidth / 100; }
public void ParagraphBorderSide(StringBuilder sb, RTFBorderSide rTFBorderSide) { if (rTFBorderSide == RTFBorderSide.None) { return; } if ((rTFBorderSide & RTFBorderSide.Left) == RTFBorderSide.Left) { sb.Append("\\brdrl"); } if ((rTFBorderSide & RTFBorderSide.Right) == RTFBorderSide.Right) { sb.Append("\\brdrr"); } if ((rTFBorderSide & RTFBorderSide.Top) == RTFBorderSide.Top) { sb.Append("\\brdrt"); } if ((rTFBorderSide & RTFBorderSide.Bottom) == RTFBorderSide.Bottom) { sb.Append("\\brdrb"); } if ((rTFBorderSide & RTFBorderSide.DoubleThickness) == RTFBorderSide.DoubleThickness) { sb.Append("\\brdrth"); } else { sb.Append("\\brdrs"); } if ((rTFBorderSide & RTFBorderSide.DoubleBorder) == RTFBorderSide.DoubleBorder) { sb.Append("\\brdrdb"); } sb.Append("\\brdrw10"); }