X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2df8090e8f9f53ce5211f7037c632f792fed9be..ae601e32a8877d7968fd4552ea7857be11a4d15c:/wxPython/wx/lib/ogl/_oglmisc.py diff --git a/wxPython/wx/lib/ogl/_oglmisc.py b/wxPython/wx/lib/ogl/_oglmisc.py index f4f72bd9d6..ad2640bc18 100644 --- a/wxPython/wx/lib/ogl/_oglmisc.py +++ b/wxPython/wx/lib/ogl/_oglmisc.py @@ -153,7 +153,7 @@ def GetCentredTextExtent(dc, text_list, xpos = 0, ypos = 0, width = 0, height = 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 @@ -386,7 +386,7 @@ def DrawArcToEllipse(x1, y1, width1, height1, x2, y2, x3, y3): E = (A + B) F = (C - (2 * A * x1) - (2 * B * x2)) G = ((A * x1 * x1) + (B * x2 * x2) - (C * x2) + D - 1) - H = (float(y3 - y2) / (x2 - x2)) + H = (float(y3 - y2) / (x3 - x2)) K = ((F * F) - (4 * E * G)) if K >= 0: