Changes needed to solve wxPython's OOR problem for the wxOGL shapes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-11-27 02:56:59 +00:00
parent 220f2d5c4d
commit 2f4e928794
33 changed files with 504 additions and 97 deletions

View File

@@ -60,6 +60,7 @@ class MyEvtHandler(wxShapeEvtHandler):
def OnLeftClick(self, x, y, keys = 0, attachment = 0):
shape = self.GetShape()
print shape.__class__
canvas = shape.GetCanvas()
dc = wxClientDC(canvas)
canvas.PrepareDC(dc)
@@ -122,7 +123,7 @@ class TestWindow(wxShapeCanvas):
self.log = log
self.frame = frame
self.SetBackgroundColour(wxWHITE)
self.SetBackgroundColour("LIGHT BLUE") #wxWHITE)
self.diagram = wxDiagram()
self.SetDiagram(self.diagram)
self.diagram.SetCanvas(self)
@@ -165,6 +166,11 @@ class TestWindow(wxShapeCanvas):
# for some reason, the shapes have to be moved for the line to show up...
fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
## EVT_PAINT(self, self.OnPaint)
## def OnPaint(self, evt):
## evt.Skip()
## print "TheLists:", wxThePenList.GetCount(), wxTheBrushList.GetCount(), wxTheFontList.GetCount()
def MyAddShape(self, shape, x, y, pen, brush, text):