X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ed3dab2615f9d2214c8e452daf844d65620cbbb..9e57c2a0325fbf10e01a79cda8b666ebac649272:/utils/wxPython/demo/wxScrolledWindow.py diff --git a/utils/wxPython/demo/wxScrolledWindow.py b/utils/wxPython/demo/wxScrolledWindow.py index 9cd5bea955..d04508458f 100644 --- a/utils/wxPython/demo/wxScrolledWindow.py +++ b/utils/wxPython/demo/wxScrolledWindow.py @@ -67,10 +67,25 @@ class MyCanvas(wxScrolledWindow): dc.SetTextForeground(wxColour(0, 0xFF, 0x80)) dc.DrawText("a bitmap", 200, 85) + font = wxFont(20, wxSWISS, wxNORMAL, wxNORMAL) + dc.SetFont(font) + dc.SetTextForeground(wxBLACK) + for a in range(0, 360, 45): + dc.DrawRotatedText("Rotated text...", 300, 300, a) + + dc.SetPen(wxTRANSPARENT_PEN) + dc.SetBrush(wxBLUE_BRUSH) + dc.DrawRectangle(50,500,50,50) + dc.DrawRectangle(100,500,50,50) + + #from wxPython import dch + #dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK) + self.DrawSavedLines(dc) dc.EndDrawing() + def DrawSavedLines(self, dc): dc.SetPen(wxPen(wxNamedColour('MEDIUM FOREST GREEN'), 4)) for line in self.lines: