Quellcode durchsuchen

fix preview text

Tuan Nguyen vor 9 Monaten
Ursprung
Commit
0e9db4f9d3
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      app.py

+ 2 - 2
app.py

@@ -361,8 +361,8 @@ async def preview_thr(request: DeleteFileRequest):
         for i, (theta, rho) in enumerate(coordinates):
             # Convert polar to cartesian coordinates
             # Use a larger viewBox (200x200) for better resolution
-            x = 100 + rho * 90 * math.cos(theta)  # Scale and center
-            y = 100 - rho * 90 * math.sin(theta)  # Scale and center, flip y-axis
+            x = 100 - rho * 90 * math.cos(theta)  # Scale and center, rotate 180 degrees
+            y = 100 - rho * 90 * math.sin(theta)  # Scale and center, rotate 180 degrees
             
             if i == 0:
                 svg_path.append(f"M {x:.2f} {y:.2f}")