iTextSharp.text.Chunk.SetUnderline C# (CSharp) Метод

SetUnderline() публичный Метод

public SetUnderline ( BaseColor color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int cap ) : Chunk
color BaseColor
thickness float
thicknessMul float
yPosition float
yPositionMul float
cap int
Результат Chunk
        public Chunk SetUnderline(BaseColor color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int cap)
        {
            if (attributes == null)
                attributes = new Dictionary<string,object>();
            Object[] obj = {color, new float[]{thickness, thicknessMul, yPosition, yPositionMul, (float)cap}};
            Object[][] old = null;
            if (attributes.ContainsKey(UNDERLINE))
                old = (Object[][])attributes[UNDERLINE];
            Object[][] unders = Utilities.AddToArray(old, obj);
            return SetAttribute(UNDERLINE, unders);
        }

Same methods

Chunk::SetUnderline ( float thickness, float yPosition ) : Chunk

Usage Example

Пример #1
5
        public void CreateTaggedPdf15() {
            InitializeDocument("15");

            Paragraph p = new Paragraph();
            Chunk chunk = new Chunk("Hello tagged world!");
            chunk.SetBackground(new BaseColor(255, 0, 255));
            chunk.Font = FontFactory.GetFont("TimesNewRoman", 20, BaseColor.ORANGE);
            chunk.SetUnderline(BaseColor.PINK, 1.2f, 1, 1, 1, 0);
            p.Add(chunk);

            document.Add(p);
            document.Close();
            int[] nums = new int[] {3};
            CheckNums(nums);
            CompareResults("15");
        }
All Usage Examples Of iTextSharp.text.Chunk::SetUnderline