/// <summary> /// Renderiza o Bloco em uma Página. /// </summary> /// <param name="p_font">Fonte.</param> /// <param name="p_posx">Posição X.</param> /// <param name="p_posy">Posição Y.</param> /// <param name="p_rightmargin">Margem direita.</param> /// <param name="p_pdf">Objeto PDF.</param> /// <param name="p_page">Página onde o Bloco será renderizado.</param> public void Render(Spartacus.Reporting.Font p_font, double p_posx, double p_posy, double p_rightmargin, PDFjet.NET.PDF p_pdf, PDFjet.NET.Page p_page) { PDFjet.NET.Line v_line; int k; // renderizando objetos do bloco for (k = 0; k < this.v_objects.Count; k++) { switch (this.v_objects[k].v_type) { case Spartacus.Reporting.ObjectType.IMAGE: this.RenderImage(this.v_objects[k], p_posx, p_posy, p_rightmargin, p_pdf, p_page); break; case Spartacus.Reporting.ObjectType.PAGENUMBER: if (this.v_objects[k].v_font != null) { this.RenderPageNumber(this.v_objects[k], p_posx, p_posy, p_rightmargin, this.v_objects[k].v_font, p_pdf, p_page); } else { this.RenderPageNumber(this.v_objects[k], p_posx, p_posy, p_rightmargin, p_font, p_pdf, p_page); } break; case Spartacus.Reporting.ObjectType.TEXT: if (this.v_objects[k].v_font != null) { this.RenderText(this.v_objects[k], p_posx, p_posy, p_rightmargin, this.v_objects[k].v_font, p_pdf, p_page); } else { this.RenderText(this.v_objects[k], p_posx, p_posy, p_rightmargin, p_font, p_pdf, p_page); } break; default: break; } } // borda superior if (this.v_border.v_top) { v_line = new PDFjet.NET.Line(p_posx, p_posy, p_page.GetWidth() - p_rightmargin, p_posy); v_line.DrawOn(p_page); } // borda inferior if (this.v_border.v_bottom) { v_line = new PDFjet.NET.Line(p_posx, p_posy + this.v_height, p_page.GetWidth() - p_rightmargin, p_posy + this.v_height); v_line.DrawOn(p_page); } // borda esquerda if (this.v_border.v_left) { v_line = new PDFjet.NET.Line(p_posx, p_posy, p_posx, p_posy + this.v_height); v_line.DrawOn(p_page); } // borda direita if (this.v_border.v_right) { v_line = new PDFjet.NET.Line(p_page.GetWidth() - p_rightmargin, p_posy, p_page.GetWidth() - p_rightmargin, p_posy + this.v_height); v_line.DrawOn(p_page); } }
/// <summary> /// Renderiza o Bloco em uma Página. /// </summary> /// <param name="p_font">Fonte.</param> /// <param name="p_posx">Posição X.</param> /// <param name="p_posy">Posição Y.</param> /// <param name="p_rightmargin">Margem direita.</param> /// <param name="p_pdf">Objeto PDF.</param> /// <param name="p_page">Página onde o Bloco será renderizado.</param> public void Render(Spartacus.Reporting.Font p_font, double p_posx, double p_posy, double p_rightmargin, PDFjet.NET.PDF p_pdf, PDFjet.NET.Page p_page) { PDFjet.NET.Line v_line; int k; // renderizando objetos do bloco for (k = 0; k < this.v_objects.Count; k++) { switch (((Spartacus.Reporting.Object)this.v_objects [k]).v_type) { case Spartacus.Reporting.ObjectType.IMAGE: this.RenderImage((Spartacus.Reporting.Object)this.v_objects [k], p_posx, p_posy, p_rightmargin, p_pdf, p_page); break; case Spartacus.Reporting.ObjectType.PAGENUMBER: if (((Spartacus.Reporting.Object)this.v_objects [k]).v_font != null) this.RenderPageNumber((Spartacus.Reporting.Object)this.v_objects [k], p_posx, p_posy, p_rightmargin, ((Spartacus.Reporting.Object)this.v_objects [k]).v_font, p_pdf, p_page); else this.RenderPageNumber((Spartacus.Reporting.Object)this.v_objects [k], p_posx, p_posy, p_rightmargin, p_font, p_pdf, p_page); break; case Spartacus.Reporting.ObjectType.TEXT: if (((Spartacus.Reporting.Object)this.v_objects [k]).v_font != null) this.RenderText((Spartacus.Reporting.Object)this.v_objects [k], p_posx, p_posy, p_rightmargin, ((Spartacus.Reporting.Object)this.v_objects [k]).v_font, p_pdf, p_page); else this.RenderText((Spartacus.Reporting.Object)this.v_objects [k], p_posx, p_posy, p_rightmargin, p_font, p_pdf, p_page); break; default: break; } } // borda superior if (this.v_border.v_top) { v_line = new PDFjet.NET.Line(p_posx, p_posy, p_page.GetWidth() - p_rightmargin, p_posy); v_line.DrawOn(p_page); } // borda inferior if (this.v_border.v_bottom) { v_line = new PDFjet.NET.Line(p_posx, p_posy + this.v_height, p_page.GetWidth() - p_rightmargin, p_posy + this.v_height); v_line.DrawOn(p_page); } // borda esquerda if (this.v_border.v_left) { v_line = new PDFjet.NET.Line(p_posx, p_posy, p_posx, p_posy + this.v_height); v_line.DrawOn(p_page); } // borda direita if (this.v_border.v_right) { v_line = new PDFjet.NET.Line(p_page.GetWidth() - p_rightmargin, p_posy, p_page.GetWidth() - p_rightmargin, p_posy + this.v_height); v_line.DrawOn(p_page); } }