Record Class FigureScene.TextOp

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.internal.layout.FigureScene.TextOp
All Implemented Interfaces:
FigureScene.Op
Enclosing class:
FigureScene

public static record FigureScene.TextOp(Transform transform, double x, double baseline, List<TextMeasurer.Segment> segments, double size, Integer fill, double fillAlpha, Integer stroke, double strokeAlpha, double strokeWidth, boolean oblique) extends Record implements FigureScene.Op
一段文字;x、baseline 為使用者座標;fill/stroke 為 null 表示不填或不描邊
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextOp(Transform transform, double x, double baseline, List<TextMeasurer.Segment> segments, double size, Integer fill, double fillAlpha, Integer stroke, double strokeAlpha, double strokeWidth, boolean oblique)
    Creates an instance of a TextOp record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the baseline record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fill record component.
    double
    Returns the value of the fillAlpha record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the oblique record component.
    Returns the value of the segments record component.
    double
    Returns the value of the size record component.
    Returns the value of the stroke record component.
    double
    Returns the value of the strokeAlpha record component.
    double
    Returns the value of the strokeWidth record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the transform record component.
    double
    x()
    Returns the value of the x record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TextOp

      public TextOp(Transform transform, double x, double baseline, List<TextMeasurer.Segment> segments, double size, Integer fill, double fillAlpha, Integer stroke, double strokeAlpha, double strokeWidth, boolean oblique)
      Creates an instance of a TextOp record class.
      Parameters:
      transform - the value for the transform record component
      x - the value for the x record component
      baseline - the value for the baseline record component
      segments - the value for the segments record component
      size - the value for the size record component
      fill - the value for the fill record component
      fillAlpha - the value for the fillAlpha record component
      stroke - the value for the stroke record component
      strokeAlpha - the value for the strokeAlpha record component
      strokeWidth - the value for the strokeWidth record component
      oblique - the value for the oblique record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • transform

      public Transform transform()
      Returns the value of the transform record component.
      Specified by:
      transform in interface FigureScene.Op
      Returns:
      the value of the transform record component
    • x

      public double x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • baseline

      public double baseline()
      Returns the value of the baseline record component.
      Returns:
      the value of the baseline record component
    • segments

      public List<TextMeasurer.Segment> segments()
      Returns the value of the segments record component.
      Returns:
      the value of the segments record component
    • size

      public double size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • fill

      public Integer fill()
      Returns the value of the fill record component.
      Returns:
      the value of the fill record component
    • fillAlpha

      public double fillAlpha()
      Returns the value of the fillAlpha record component.
      Returns:
      the value of the fillAlpha record component
    • stroke

      public Integer stroke()
      Returns the value of the stroke record component.
      Returns:
      the value of the stroke record component
    • strokeAlpha

      public double strokeAlpha()
      Returns the value of the strokeAlpha record component.
      Returns:
      the value of the strokeAlpha record component
    • strokeWidth

      public double strokeWidth()
      Returns the value of the strokeWidth record component.
      Returns:
      the value of the strokeWidth record component
    • oblique

      public boolean oblique()
      Returns the value of the oblique record component.
      Returns:
      the value of the oblique record component