Export other shapes

This commit is contained in:
2024-02-26 10:04:57 -05:00
parent 5864dc5c06
commit 3d681da551
2 changed files with 24 additions and 0 deletions

View File

@ -708,6 +708,12 @@ class Painter(Widget):
for particle in self.particles:
if type(particle)==Cross:
ff.write("\cross{"+colors.closest_color(particle.color,colors.xcolor_names)+"}")
elif type(particle)==Disk:
ff.write("\disk{"+colors.closest_color(particle.color,colors.xcolor_names)+"}")
elif type(particle)==Staircase:
ff.write("\staircase{"+colors.closest_color(particle.color,colors.xcolor_names)+"}")
elif type(particle)==Square2:
ff.write("\square{"+colors.closest_color(particle.color,colors.xcolor_names)+"}")
ff.write("{{({:05.2f},{:05.2f})}};\n".format(particle.elements[0].pos.x-self.particles[0].elements[0].pos.x,particle.elements[0].pos.y-self.particles[0].elements[0].pos.y))
ff.write("\\end{tikzpicture}\n")