X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2df8090e8f9f53ce5211f7037c632f792fed9be..0797d64777de79f01a1580100f983e9a76d34f45:/wxPython/wx/lib/ogl/_oglmisc.py diff --git a/wxPython/wx/lib/ogl/_oglmisc.py b/wxPython/wx/lib/ogl/_oglmisc.py index f4f72bd9d6..db2185c832 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 @@ -333,7 +333,7 @@ def GraphicsStraightenLine(point1, point2): elif abs(float(dy) / dx) > 1: point2[0] = point1[0] else: - point2[1] = point1[0] + point2[1] = point1[1] @@ -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: