Record Class FigureContent.Svg

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.FigureContent.Svg
Record Components:
markup - SVG 原始碼
All Implemented Interfaces:
FigureContent
Enclosing interface:
FigureContent

public static record FigureContent.Svg(String markup) extends Record implements FigureContent

受限 SVG

只接受 REP-04 契約定義的子集(白名單元素與屬性、無外部資源、複雜度上限),於 ReportDocument.Builder#build() 驗證,不合法時回報 report.model.figure.svg-* ERROR。 viewBox 依 preserveAspectRatio 對應到 Figure 的寬高;圖內文字以已登錄的字型輸出為可抽取的 PDF 文字。

Since:
4.0.0
  • Constructor Details

    • Svg

      public Svg(String markup)
      Creates an instance of a Svg record class.
      Parameters:
      markup - the value for the markup 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • markup

      public String markup()
      Returns the value of the markup record component.
      Returns:
      the value of the markup record component