Exemplo n.º 1
0
		protected BaseProperty(IStyleContainer parent)
		{
			if (parent == null)
			{
				throw new ArgumentNullException("parent");
			}

			Parent = parent;
		}
Exemplo n.º 2
0
		public BoundsProperty(IStyleContainer parent)
			: base(parent)
		{ }
Exemplo n.º 3
0
 public LabelStyle(IStyleContainer parent, XElement definition)
     : base(parent, definition)
 { }
Exemplo n.º 4
0
		public ContentProperty(IStyleContainer parent)
			: base(parent)
		{ }
Exemplo n.º 5
0
		public ImageProperty(IStyleContainer parent)
			: base(parent)
		{ }
Exemplo n.º 6
0
 public TransformProperty(IStyleContainer parent)
     : base(parent)
 { }
Exemplo n.º 7
0
		/// <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();
		}
Exemplo n.º 8
0
		protected BaseStyleContainer(IStyleContainer parent, XElement definition)
		{
			Parent = parent;
			Definition = definition;
		}
Exemplo n.º 9
0
 /// <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;
 }