Пример #1
0
		protected BaseProperty(IStyleContainer parent)
		{
			if (parent == null)
			{
				throw new ArgumentNullException("parent");
			}

			Parent = parent;
		}
Пример #2
0
		public BoundsProperty(IStyleContainer parent)
			: base(parent)
		{ }
Пример #3
0
 public LabelStyle(IStyleContainer parent, XElement definition)
     : base(parent, definition)
 { }
Пример #4
0
		public ContentProperty(IStyleContainer parent)
			: base(parent)
		{ }
Пример #5
0
		public ImageProperty(IStyleContainer parent)
			: base(parent)
		{ }
Пример #6
0
 public TransformProperty(IStyleContainer parent)
     : base(parent)
 { }
Пример #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();
		}
Пример #8
0
		protected BaseStyleContainer(IStyleContainer parent, XElement definition)
		{
			Parent = parent;
			Definition = definition;
		}
Пример #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;
 }