Class LineElement

java.lang.Object
com.dynamicpdf.api.elements.Element
com.dynamicpdf.api.elements.LineElement

public class LineElement extends Element
Represents a line page element.

This class can be used to place lines of different length, width, color and patterns on a page.

  • Constructor Details

    • LineElement

      public LineElement(ElementPlacement placement, float x2Offset, float y2Offset)
      Initializes a new instance of the LineElement class.
      Parameters:
      placement - The placement of the line on the page.
      x2Offset - X2 coordinate of the line.
      y2Offset - Y2 coordinate of the line.
  • Method Details

    • getColor

      public Color getColor()
      Gets the Color object to use for the line.
      Returns:
      The Color object to use for the line.
    • setColor

      public void setColor(Color value)
      Sets the Color object to use for the line.
      Parameters:
      value - The Color object to use for the line.
    • getX2Offset

      public float getX2Offset()
      Gets the X2 coordinate of the line.
      Returns:
      The X2 coordinate of the line.
    • setX2Offset

      public void setX2Offset(float value)
      Sets the X2 coordinate of the line.
      Parameters:
      value - The X2 coordinate of the line.
    • getY2Offset

      public float getY2Offset()
      Gets Y2 coordinate of the line.
      Returns:
      The Y2 coordinate of the line.
    • setY2Offset

      public void setY2Offset(float value)
      Sets the Y2 coordinate of the line.
      Parameters:
      value - The Y2 coordinate of the line.
    • getWidth

      public float getWidth()
      Gets the width of the line.
      Returns:
      The width of the line.
    • setWidth

      public void setWidth(float value)
      Sets the width of the line.
      Parameters:
      value - The width of the line.
    • getLineStyle

      public LineStyle getLineStyle()
      Gets the LineStyle object to use for the style of the line.
      Returns:
      The LineStyle object to use for the style of the line.
    • setLineStyle

      public void setLineStyle(LineStyle value)
      Sets the LineStyle object to use for the style of the line.
      Parameters:
      value - The LineStyle object to use for the style of the line.