コード例 #1
0
 /// <summary>
 /// Creates a background with a specified color, and extra space that
 /// must be counted as part of the background and therefore colored.
 /// </summary>
 /// <remarks>
 /// Creates a background with a specified color, and extra space that
 /// must be counted as part of the background and therefore colored.
 /// These values are allowed to be negative.
 /// </remarks>
 /// <param name="color">the background color</param>
 /// <param name="opacity">the opacity of the background color; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent
 ///     </param>
 /// <param name="extraLeft">extra coloring to the left side</param>
 /// <param name="extraTop">extra coloring at the top</param>
 /// <param name="extraRight">extra coloring to the right side</param>
 /// <param name="extraBottom">extra coloring at the bottom</param>
 public Background(Color color, float opacity, float extraLeft, float extraTop, float extraRight, float extraBottom
                   )
 {
     this.transparentColor = new TransparentColor(color, opacity);
     this.extraLeft        = extraLeft;
     this.extraRight       = extraRight;
     this.extraTop         = extraTop;
     this.extraBottom      = extraBottom;
 }
コード例 #2
0
 /// <summary>Creates an Underline.</summary>
 /// <remarks>
 /// Creates an Underline. Both the thickness and vertical positioning under
 /// the text element's base line can be set to a fixed value, or a variable
 /// one depending on the element's font size.
 /// If you want a fixed-width thickness, set <c>thicknessMul</c> to 0;
 /// if you want a thickness solely dependent on the font size, set
 /// <c>thickness</c> to 0.
 /// Mutatis mutandis for the y-position.
 /// </remarks>
 /// <param name="color">
 /// the
 /// <see cref="iText.Kernel.Colors.Color"/>
 /// of the underline
 /// </param>
 /// <param name="opacity">a float defining the opacity of the underline; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent
 ///     </param>
 /// <param name="thickness">a float defining the minimum thickness in points of the underline</param>
 /// <param name="thicknessMul">a float defining the font size dependent component of the thickness of the underline
 ///     </param>
 /// <param name="yPosition">a float defining the default absolute vertical distance in points from the text's base line
 ///     </param>
 /// <param name="yPositionMul">a float defining the font size dependent component of the vertical positioning of the underline
 ///     </param>
 /// <param name="lineCapStyle">
 /// the way the underline finishes at its edges.
 /// <see cref="iText.Kernel.Pdf.Canvas.PdfCanvasConstants.LineCapStyle"/>
 /// </param>
 public Underline(Color color, float opacity, float thickness, float thicknessMul, float yPosition, float yPositionMul
                  , int lineCapStyle)
 {
     this.transparentColor = new TransparentColor(color, opacity);
     this.thickness        = thickness;
     this.thicknessMul     = thicknessMul;
     this.yPosition        = yPosition;
     this.yPositionMul     = yPositionMul;
     this.lineCapStyle     = lineCapStyle;
 }