view.py 498 B

12345678910111213141516171819202122
  1. from lazpaint import command
  2. def zoom_in(fine=False):
  3. command.send("ViewZoomIn", Fine=fine)
  4. def zoom_out(fine=False):
  5. command.send("ViewZoomOut", Fine=fine)
  6. def zoom_fit():
  7. command.send("ViewZoomFit")
  8. def set_zoom(factor=1.0):
  9. command.send("ViewZoomSet", Factor=factor)
  10. def get_zoom() -> float:
  11. return command.send("ViewZoomGet?")
  12. def set_grid_visible(visible=None):
  13. command.send("ViewGrid", Visible=visible)
  14. def get_grid_visible() -> bool:
  15. return command.send("ViewGridGet?")