X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b9a4190f70909de9568f45389e7aa3ecbc66b8a..6a8b9da42c22b34c1f8ea5f10080e7c51e21a330:/wxPython/demo/ColourDB.py?ds=sidebyside diff --git a/wxPython/demo/ColourDB.py b/wxPython/demo/ColourDB.py index e4995cfefa..ad7c92fc74 100644 --- a/wxPython/demo/ColourDB.py +++ b/wxPython/demo/ColourDB.py @@ -47,7 +47,7 @@ class TestWindow(wxScrolledWindow): while x < sz.width: y = -dy while y < sz.height: - dc.DrawBitmap(self.bg_bmp, x, y) + dc.DrawBitmap(self.bg_bmp, (x, y)) y = y + h x = x + w @@ -57,7 +57,7 @@ class TestWindow(wxScrolledWindow): if not dc: dc = wxClientDC(self) rect = self.GetUpdateRegion().GetBox() - dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height) + dc.SetClippingRect(rect) self.TileBackground(dc) @@ -89,11 +89,12 @@ class TestWindow(wxScrolledWindow): for line in range(max(0,start), min(stop,numColours)): clr = colours[line] y = (line+1) * self.lineHeight + 2 - dc.DrawText(clr, self.cellWidth, y) + dc.DrawText(clr, (self.cellWidth, y)) brush = wxBrush(clr, wxSOLID) dc.SetBrush(brush) - dc.DrawRectangle(12 * self.cellWidth, y, 6 * self.cellWidth, self.textHeight) + dc.DrawRectangle((12 * self.cellWidth, y), + (6 * self.cellWidth, self.textHeight)) dc.EndDrawing()