für ein altes Projekt von mir bin ich gerad dabei dieses als SVG zu speichern. Jetzt bin ich auf ein Problem gestoßen. Und zwar beim überführen von Radial Gradient zu SVG Radial Gradient. Ich verstehe die Werte noch nicht so ganz. lt MDN https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createRadialGradient ist
die Werte
die WerteJava:CanvasRenderingContext2D.createRadialGradient()
bei SVG https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradientx0 The x-axis coordinate of the start circle
y0 The y-axis coordinate of the start circle.
r0 The radius of the start circle. Must be non-negative and finite.
x1 The x-axis coordinate of the end circle.
y1 The y-axis coordinate of the end circle.
r1 The radius of the end circle. Must be non-negative and finite.
die Werte
Wie könnte ich die Werte vom Javascript Radial Gradient zu SVG Radial Gradient überführen?cx This attribute defines the x coordinate of the end circle of the radial gradient.
Value type: <length> ; Default value: 50%; Animatable: yes
cy This attribute defines the y coordinate of the end circle of the radial gradient.
Value type: <length> ; Default value: 50%; Animatable: yes
fr This attribute defines the radius of the start circle of the radial gradient. The gradient will be drawn such that the 0% <stop> is mapped to the perimeter of the start circle.
Value type: <length> ; Default value: 0%; Animatable: yes
fx This attribute defines the x coordinate of the start circle of the radial gradient.
Value type: <length> ; Default value: Same as cx; Animatable: yes
fy This attribute defines the y coordinate of the start circle of the radial gradient.
Value type: <length> ; Default value: Same as cy; Animatable: yes