private float FontSize(PicGraphics.TextType tType) { switch (tType) { case TextType.FT_COTATION: return(_pdfDocument.PageSize.Height / 25.0f); default: throw new Exception("Unknown text type"); } }
public Font ToFont(PicGraphics.TextType textType) { switch (textType) { case TextType.FT_COTATION: return(new Font("Arial", 8)); default: throw new Exception("Unexpected text type"); } }
private Font ToFont(PicGraphics.TextType tType) { switch (tType) { case TextType.FT_COTATION: { BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); return(new Font(bf, FontSize(tType), Font.NORMAL, BaseColor.GREEN)); } default: throw new Exception("Unknown text type"); } }
private BaseFont ToBaseFont(PicGraphics.TextType tType) { switch (tType) { case TextType.FT_COTATION: { BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); _cb.SetFontAndSize(bf, FontSize(tType)); _cb.SetColorFill(BaseColor.GREEN); return(bf); } default: throw new Exception("Unknown text type"); } }