Aspose.Pdf.Examples.CSharp.AsposePDF.Text.SearchTextAndDrawRectangle.DrawBox C# (CSharp) Method

DrawBox() private static method

private static DrawBox ( PdfContentEditor editor, int page, TextSegment segment, System color ) : void
editor PdfContentEditor
page int
segment TextSegment
color System
return void
        private static void DrawBox(PdfContentEditor editor, int page, TextSegment segment, System.Drawing.Color color)
        {

            var lineInfo = new LineInfo();

            lineInfo.VerticeCoordinate = new[] {

            (float)segment.Rectangle.LLX, (float)segment.Rectangle.LLY,

            (float)segment.Rectangle.LLX, (float)segment.Rectangle.URY,

            (float)segment.Rectangle.URX, (float)segment.Rectangle.URY,

            (float)segment.Rectangle.URX, (float)segment.Rectangle.LLY

            };

            lineInfo.Visibility = true;

            lineInfo.LineColor = color;

            editor.CreatePolygon(lineInfo, page, new System.Drawing.Rectangle(0, 0, 0, 0), null);

        }
        // ExEnd:DrawBox
SearchTextAndDrawRectangle