Record Class Transform
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.internal.svg.Transform
二維仿射轉換:
x' = a·x + c·y + e、y' = b·x + d·y + f(與 SVG matrix(a b c d e f) 相同)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTransform(double a, double b, double c, double d, double e, double f) Creates an instance of aTransformrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublea()Returns the value of thearecord component.doubleb()Returns the value of thebrecord component.doublec()Returns the value of thecrecord component.doubled()Returns the value of thedrecord component.doublee()Returns the value of theerecord component.final booleanIndicates whether some other object is "equal to" this one.doublef()Returns the value of thefrecord component.final inthashCode()Returns a hash code value for this object.doublemaxScale()最大縮放(線性部分的最大奇異值),用於線寬與字級static Transformrotate(double degrees) static Transformscale(double sx, double sy) 先套用other,再套用本轉換final StringtoString()Returns a string representation of this record class.static Transformtranslate(double tx, double ty) doublex(double x, double y) doubley(double x, double y)
-
Field Details
-
IDENTITY
-
-
Constructor Details
-
Transform
public Transform(double a, double b, double c, double d, double e, double f) Creates an instance of aTransformrecord class.- Parameters:
a- the value for thearecord componentb- the value for thebrecord componentc- the value for thecrecord componentd- the value for thedrecord componente- the value for theerecord componentf- the value for thefrecord component
-
-
Method Details
-
translate
-
scale
-
rotate
- Parameters:
degrees- 角度(順時針,與 SVG 相同的 y 向下座標系)
-
times
-
x
public double x(double x, double y) -
y
public double y(double x, double y) -
maxScale
public double maxScale()最大縮放(線性部分的最大奇異值),用於線寬與字級 -
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
a
public double a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
public double b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-
c
public double c()Returns the value of thecrecord component.- Returns:
- the value of the
crecord component
-
d
public double d()Returns the value of thedrecord component.- Returns:
- the value of the
drecord component
-
e
public double e()Returns the value of theerecord component.- Returns:
- the value of the
erecord component
-
f
public double f()Returns the value of thefrecord component.- Returns:
- the value of the
frecord component
-