From 52f9df3c4df74abf87bbafb167e46f33b256ba60 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Wed, 1 Dec 2021 18:58:24 -0500 Subject: [PATCH] change center for finer meshes --- painter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/painter.py b/painter.py index d8deb76..435f792 100644 --- a/painter.py +++ b/painter.py @@ -66,13 +66,13 @@ class Painter(Widget): height_offset=self.app.status_bar.height+self.app.command_prompt.height # vertical lines # offest wrt 0 - offset=(pos.x-mesh/2)%mesh + offset=(pos.x-0.5)%mesh for i in range(math.floor((self.width/Square_element.size-offset)/mesh)+1): Color(1,1,1) Line(points=((i*mesh+offset)*Square_element.size,height_offset,(i*mesh+offset)*Square_element.size,self.height+height_offset)) # horizontal lines # offset wrt 0 - offset=(pos.y-mesh/2)%1-height_offset/Square_element.size + offset=(pos.y-0.5)%1-height_offset/Square_element.size for i in range(math.floor((self.height/Square_element.size-offset)/mesh)+1): Color(1,1,1) Line(points=(0,(i*mesh+offset)*Square_element.size+height_offset,self.width,(i*mesh+offset)*Square_element.size+height_offset))