max_width = 0
     for line in text_list:
-        current_width, char_height = dc.GetTextExtent(line)
+        current_width, char_height = dc.GetTextExtent(line.GetText())
         if current_width > max_width:
             max_width = current_width
 
     elif abs(float(dy) / dx) > 1:
         point2[0] = point1[0]
     else:
-        point2[1] = point1[0]
+        point2[1] = point1[1]