Class LinearGradient

java.lang.Object
com.independentsoft.office.odf.styles.LinearGradient

public class LinearGradient extends Object
Define linear gradients to fill or stroke graphical elements.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the LinearGradient class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new object that is a deep copy of the current instance.
    Gets the name of a gradient.
    Gets the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system.
    Gets the coordinate system.
    Gets the name by which a gradient can be referenced.
    Specifies what happens if the gradient starts or ends inside the bounds of the target rectangle.
    Contains a collection of SvgStop objects.
    Gets the x1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    Gets the x2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    Gets the y1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    Gets the y2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    void
    setDisplayName​(String displayName)
    Sets the name of a gradient.
    void
    setGradientTransform​(String gradientTransform)
    Sets the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system.
    void
    setGradientUnits​(String gradientUnits)
    Sets the coordinate system.
    void
    setName​(String name)
    Sets the name by which a gradient can be referenced.
    void
    setSpreadMethod​(SpreadMethod spreadMethod)
    Specifies what happens if the gradient starts or ends inside the bounds of the target rectangle.
    void
    setX1​(Size x1)
    Sets the x1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    void
    setX2​(Size x2)
    Sets the x2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    void
    setY1​(Size y1)
    Sets the y1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    void
    setY2​(Size y2)
    Sets the y2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
    Converts the value of the current LinearGradient object to its equivalent string representation.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LinearGradient

      public LinearGradient()
      Initializes a new instance of the LinearGradient class.
  • Method Details

    • clone

      public LinearGradient clone()
      Creates a new object that is a deep copy of the current instance.
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current LinearGradient object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getName

      public String getName()
      Gets the name by which a gradient can be referenced.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name by which a gradient can be referenced.
      Parameters:
      name - the new name
    • getDisplayName

      public String getDisplayName()
      Gets the name of a gradient.
      Returns:
      the display name
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the name of a gradient.
      Parameters:
      displayName - the new display name
    • getX1

      public Size getX1()
      Gets the x1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Returns:
      the x1
    • setX1

      public void setX1(Size x1)
      Sets the x1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Parameters:
      x1 - the new x1
    • getX2

      public Size getX2()
      Gets the x2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Returns:
      the x2
    • setX2

      public void setX2(Size x2)
      Sets the x2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Parameters:
      x2 - the new x2
    • getY1

      public Size getY1()
      Gets the y1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Returns:
      the y1
    • setY1

      public void setY1(Size y1)
      Sets the y1-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Parameters:
      y1 - the new y1
    • getY2

      public Size getY2()
      Gets the y2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Returns:
      the y2
    • setY2

      public void setY2(Size y2)
      Sets the y2-axis coordinate of the start of the vector gradient onto which the elements are mapped.
      Parameters:
      y2 - the new y2
    • getStops

      public List<SvgStop> getStops()
      Contains a collection of SvgStop objects.
      Returns:
      the stops
    • getGradientUnits

      public String getGradientUnits()
      Gets the coordinate system.
      Returns:
      the gradient units
    • setGradientUnits

      public void setGradientUnits(String gradientUnits)
      Sets the coordinate system.
      Parameters:
      gradientUnits - the new gradient units
    • getGradientTransform

      public String getGradientTransform()
      Gets the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system.
      Returns:
      the gradient transform
    • setGradientTransform

      public void setGradientTransform(String gradientTransform)
      Sets the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system.
      Parameters:
      gradientTransform - the new gradient transform
    • getSpreadMethod

      public SpreadMethod getSpreadMethod()
      Specifies what happens if the gradient starts or ends inside the bounds of the target rectangle.
      Returns:
      the spread method
    • setSpreadMethod

      public void setSpreadMethod(SpreadMethod spreadMethod)
      Specifies what happens if the gradient starts or ends inside the bounds of the target rectangle.
      Parameters:
      spreadMethod - the new spread method