@@ -550,6 +550,7 @@ def show_preview(self):
550550 self .canvas .itemconfig (self .image_on_canvas , image = self .canvas .image )
551551
552552 for i in range (len (self .DoseFigureHandler .plots )):
553+ factor = (self .canvas .image .width () / self .canvas .image .height ()) / 2
553554 temp = self .canvas .create_rectangle (
554555 (
555556 - 0.00833
@@ -562,9 +563,9 @@ def show_preview(self):
562563 + 0.94633
563564 )
564565 * self .canvas .image .width (),
565- (0.023 + 0.042 * i ) * self .canvas .image .height (),
566+ (0.023 + 0.042 * i ) * self .canvas .image .height () * factor ,
566567 0.988 * self .canvas .image .width (),
567- (0.065 + 0.042 * i ) * self .canvas .image .height (),
568+ (0.065 + 0.042 * i ) * self .canvas .image .height () * factor ,
568569 fill = "" ,
569570 outline = "" ,
570571 )
@@ -630,6 +631,7 @@ def handle_configure(self, event):
630631 x = self .canvas .image .width ()
631632 y = self .canvas .image .height ()
632633 self .canvas .delete (temp [i ])
634+ factor = (self .canvas .image .width () / self .canvas .image .height ()) / 2
633635 self .rename_boxes += [
634636 self .canvas .create_rectangle (
635637 (
@@ -646,9 +648,9 @@ def handle_configure(self, event):
646648 + 0.94633
647649 )
648650 * x ,
649- (0.023 + 0.042 * i ) * y ,
651+ (0.023 + 0.042 * i ) * y * factor ,
650652 0.988 * x ,
651- (0.065 + 0.042 * i ) * y ,
653+ (0.065 + 0.042 * i ) * y * factor ,
652654 fill = "" ,
653655 outline = "" ,
654656 tags = "rename" ,
0 commit comments