本文整理汇总了C#中Spartacus.GetFont方法的典型用法代码示例。如果您正苦于以下问题:C# Spartacus.GetFont方法的具体用法?C# Spartacus.GetFont怎么用?C# Spartacus.GetFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spartacus
的用法示例。
在下文中一共展示了Spartacus.GetFont方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderText
/// <summary>
/// Renderiza um rótulo de texto no Bloco.
/// </summary>
/// <param name="p_object">Objeto a ser renderizado.</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_font">Fonte.</param>
/// <param name="p_pdf">Objeto PDF.</param>
/// <param name="p_page">Página onde será renderizado.</param>
private void RenderText(Spartacus.Reporting.Object p_object, double p_posx, double p_posy, double p_rightmargin, Spartacus.Reporting.Font p_font, PDFjet.NET.PDF p_pdf, PDFjet.NET.Page p_page)
{
PDFjet.NET.TextLine v_text;
if (p_object.v_pdfobject == null)
{
v_text = new PDFjet.NET.TextLine(p_font.GetFont(p_pdf));
v_text.SetText(System.Net.WebUtility.HtmlDecode(p_object.v_value));
switch (p_object.v_align)
{
case Spartacus.Reporting.FieldAlignment.LEFT:
v_text.SetPosition(p_posx + p_object.v_posx, p_posy + p_object.v_posy);
break;
case Spartacus.Reporting.FieldAlignment.RIGHT:
v_text.SetPosition(p_page.GetWidth() - p_rightmargin - v_text.GetWidth(), p_posy + p_object.v_posy);
break;
case Spartacus.Reporting.FieldAlignment.CENTER:
v_text.SetPosition(p_posx + ((p_page.GetWidth() - p_rightmargin - p_posx) / 2) - (v_text.GetWidth() / 2), p_posy + p_object.v_posy);
break;
default:
break;
}
v_text.DrawOn(p_page);
p_object.v_pdfobject = v_text;
}
else
((PDFjet.NET.TextLine) p_object.v_pdfobject).DrawOn(p_page);
}