/** * Makes a copy of the given RtfBorder * * @param doc The RtfDocument this RtfBorder belongs to * @param borderType The border type of this RtfBorder * @param border The RtfBorder to copy */ protected internal RtfBorder(RtfDocument doc, int borderType, RtfBorder border) : base(doc) { this.borderType = borderType; this.borderPosition = border.GetBorderPosition(); this.borderStyle = border.GetBorderStyle(); this.borderWidth = border.GetBorderWidth(); this.borderColor = new RtfColor(this.document, border.GetBorderColor()); }
/// <summary> /// Constructs a RtfBorderGroup based on another RtfBorderGroup. /// </summary> /// <param name="doc">The RtfDocument this RtfBorderGroup belongs to</param> /// <param name="borderType">The type of borders this RtfBorderGroup contains</param> /// <param name="borderGroup">The RtfBorderGroup to use as a base</param> protected internal RtfBorderGroup(RtfDocument doc, int borderType, RtfBorderGroup borderGroup) : base(doc) { _borders = new Hashtable(); _borderType = borderType; if (borderGroup != null) { foreach (DictionaryEntry entry in borderGroup.GetBorders()) { int borderPos = (int)entry.Key; RtfBorder border = (RtfBorder)entry.Value; _borders[borderPos] = new RtfBorder(Document, _borderType, border); } } }
/** * Sets a border in the Hashtable of borders * * @param borderPosition The position of this RtfBorder * @param borderStyle The type of borders this RtfBorderGroup contains * @param borderWidth The border width to use * @param borderColor The border color to use */ private void SetBorder(int borderPosition, int borderStyle, float borderWidth, Color borderColor) { RtfBorder border = new RtfBorder(this.document, this.borderType, borderPosition, borderStyle, borderWidth, borderColor); this.borders[borderPosition] = border; }
/// <summary> /// Sets a border in the Hashtable of borders /// </summary> /// <param name="borderPosition">The position of this RtfBorder</param> /// <param name="borderStyle">The type of borders this RtfBorderGroup contains</param> /// <param name="borderWidth">The border width to use</param> /// <param name="borderColor">The border color to use</param> private void setBorder(int borderPosition, int borderStyle, float borderWidth, BaseColor borderColor) { RtfBorder border = new RtfBorder(Document, _borderType, borderPosition, borderStyle, borderWidth, borderColor); _borders[borderPosition] = border; }