Esempio n. 1
0
		/// <summary>
		/// creates a new rectangle
		/// </summary>
		/// <param name="RectangleArea">the area which will contains the rectangle</param>
		/// <param name="BorderColor"></param>
		public PdfRectangle(PdfDocument PdfDocument,PdfArea RectangleArea,Color BorderColor)
		{
			this.PdfDocument=PdfDocument;
			this.rectangleArea=RectangleArea;
			this.BorderColor=BorderColor;
			this.strokeWidth=1;
		}
Esempio n. 2
0
		/// <summary>
		/// creates a new rectangle 
		/// </summary>
		/// <param name="RectangleArea"></param>
		/// <param name="BorderColor"></param>
		/// <param name="BorderWidth"></param>
		public PdfRectangle(PdfDocument PdfDocument,PdfArea RectangleArea,Color BorderColor,double BorderWidth)
		{
			this.PdfDocument=PdfDocument;
			if (BorderWidth<=0) throw new Exception("BorderWidth must be greater than zero.");
			this.rectangleArea=RectangleArea;
			this.BorderColor=BorderColor;
			this.strokeWidth=BorderWidth;
		}
Esempio n. 3
0
		internal PdfHeader(PdfDocument PdfDocument,string subject,string title,string author)
		{
			this.PdfDocument=PdfDocument;
			this.id=this.PdfDocument.GetNextId;
			this.subject=subject;
			this.title=title;
			this.author=author;
			this.creationdate=DateTime.Today.ToShortDateString();
		}
Esempio n. 4
0
		/// <summary>
		/// Generates a new Area inside the base one specifing the width difference.
		/// </summary>
		/// <param name="Difference">the Width difference of the inner Area</param>
		/// <returns></returns>
		public PdfArea InnerArea(double Difference)
		{
			this.PdfDocument=PdfDocument;
			if (Difference<0) throw new Exception("Difference must be non negative.");
			PdfArea pa=this.MemberwiseClone() as PdfArea;
			pa.width-=(double)Difference;
			pa.Height-=(double)Difference;
			pa.posx+=(double)Difference/2;
			pa.posy+=(double)Difference/2;
			return pa;
		}
Esempio n. 5
0
		internal PdfArea (PdfDocument PdfDocument){this.PdfDocument=PdfDocument;}
Esempio n. 6
0
		/// <summary>
		/// Creates a new Area for correctly placing objects into Pdf Pages
		/// </summary>
		/// <param name="posx">Top-Left Vertex X-coordinate</param>
		/// <param name="posy">Top-Left Vertex Y-coordinate</param>
		/// <param name="width">Width of the Area</param>
		/// <param name="height">Height of the Area</param>
		public PdfArea (PdfDocument PdfDocument,double posx,double posy,double width,double height)
		{
			this.PdfDocument=PdfDocument;
			if (width<=0) throw new Exception("Width must be grater than zero.");
			if (height<=0) throw new Exception("Height must be grater than zero.");
			this.PosX=(double)posx;
			this.PosY=(double)posy;
			this.Width=(double)width;
			this.Height=(double)height;
			
		}
Esempio n. 7
0
		public PdfCatalog(PdfDocument PdfDocument)
		{
			this.PdfDocument=PdfDocument;
			this.id=this.PdfDocument.GetNextId;
		}
Esempio n. 8
0
		/// <summary>
		/// creates a new rectangle
		/// </summary>
		/// <param name="RectangleArea"></param>
		/// <param name="BorderColor"></param>
		/// <param name="FillingColor"></param>
		public PdfRectangle(PdfDocument PdfDocument,PdfArea RectangleArea,Color BorderColor,Color FillingColor)
		{
			this.PdfDocument=PdfDocument;
			this.rectangleArea=RectangleArea;
			this.BorderColor=BorderColor;
			this.FillingColor=FillingColor;
			this.filled=true;
			this.strokeWidth=1;
		}
Esempio n. 9
0
		internal PdfTable(PdfDocument PdfDocument,ContentAlignment DefaultContentAlignment,Font Font,Color DefaultForegroundColor,int Rows
			,int Columns,double CellPadding)
		{
			cells=new Hashtable();
			pdfRows=new ArrayList();
			this.owner=this;
			this.PdfDocument=PdfDocument;
			this.borderWidth=0;
			this.pdfColumns=new ArrayList();
			this.rows=Rows;
			this.startRow=0;
			this.startColumn=0;
			this.endColumn=Columns-1;
			this.endRow=Rows-1;
			this.columns=Columns;
			
			for (int c=0;c<columns;c++)
				for (int r=0;r<rows;r++)
				{
					this.cells[r+","+c]=new PdfCell(this,r,c,DefaultContentAlignment,DefaultForegroundColor
						,Font,CellPadding);
				}
			for (int r=0;r<rows;r++)
			{
				this.pdfRows.Add(new PdfRow(this,r));
			}
			for (int c=0;c<columns;c++)
			{
				PdfColumn pc=new PdfColumn(this,c);
				pc.Width=100/this.columns;
				this.pdfColumns.Add(pc);
			}
		}
Esempio n. 10
0
		public PdfRoot(PdfDocument PdfDocument)
		{
			this.PdfDocument=PdfDocument;
			this.id=this.PdfDocument.GetNextId;

		}