protected BaseProperty(IStyleContainer parent) { if (parent == null) { throw new ArgumentNullException("parent"); } Parent = parent; }
public BoundsProperty(IStyleContainer parent) : base(parent) { }
public LabelStyle(IStyleContainer parent, XElement definition) : base(parent, definition) { }
public ContentProperty(IStyleContainer parent) : base(parent) { }
public ImageProperty(IStyleContainer parent) : base(parent) { }
public TransformProperty(IStyleContainer parent) : base(parent) { }
/// <summary> /// Tested. Main draw operation. /// /// 20130718 :: Add Arabic support /// </summary> /// <param name="cb"></param> /// <param name="phrase"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="width"></param> /// <param name="ELEMENT_ALIGN"></param> /// <param name="textBoxStyle"></param> public void DrawString(iTextSharp.text.pdf.PdfContentByte cb, iTextSharp.text.Phrase phrase, float x, float y, float width, int ELEMENT_ALIGN, IStyleContainer textBoxStyle) { iTextSharp.text.pdf.ColumnText column = new iTextSharp.text.pdf.ColumnText(cb); //add style, only SingleTextBoxStyle supported if (textBoxStyle != null && textBoxStyle is SingleTextBoxStyle) { Color? bckCol = ((SingleTextBoxStyle)textBoxStyle).BackgroundColor; if (bckCol != null && bckCol.HasValue) { if (phrase != null) { BaseColor color = new BaseColor(bckCol.Value); foreach (iTextSharp.text.Chunk act in phrase.Chunks) { act.SetBackground(color);//sets the same backcolor to the text. } } } } //column.SetSimpleColumn(x, y, x + width, (y + chunk.Font.Size + (chunk.Font.Size / 2) + 2)); column.SetSimpleColumn(x, y - 2, (x + width), (y + 18)); column.AddText(phrase); column.Alignment = ELEMENT_ALIGN; //20130718 :: Arabic support if (DetectRightToLeft && IsArabicHebrewText(phrase.Content)) { column.RunDirection = iTextSharp.text.pdf.PdfWriter.RUN_DIRECTION_RTL; } //--- column.Go(); }
protected BaseStyleContainer(IStyleContainer parent, XElement definition) { Parent = parent; Definition = definition; }
/// <summary> /// Initializes a new style for the given love. /// </summary> /// <param name="parent">The parent.</param> /// <param name="loveId">The id of the love the style is for.</param> public Style(IStyleContainer parent, int loveId = -1) { this.m_Parent = parent; this.m_LoveId = loveId; }