|
@@ -723,7 +723,7 @@ class PsMapFrame(wx.Frame):
|
|
|
def getTextExtent(self, textDict):
|
|
|
"""!Estimates bounding rectangle of text"""
|
|
|
#fontsize = str(fontsize if fontsize >= 4 else 4)
|
|
|
- dc = wx.PaintDC(self) # dc created because of method GetTextExtent, which pseudoDC lacks
|
|
|
+ dc = wx.ClientDC(self) # dc created because of method GetTextExtent, which pseudoDC lacks
|
|
|
|
|
|
fn = self.makePSFont(textDict)
|
|
|
|
|
@@ -984,7 +984,7 @@ class PsMapBufferedWindow(wx.Window):
|
|
|
self.pdcPaper = wx.PseudoDC()
|
|
|
self.pdcTmp = wx.PseudoDC()
|
|
|
self.pdcImage = wx.PseudoDC()
|
|
|
- dc = wx.PaintDC(self)
|
|
|
+ dc = wx.ClientDC(self)
|
|
|
self.font = dc.GetFont()
|
|
|
|
|
|
self.SetClientSize((700,510))#?
|
|
@@ -1068,7 +1068,7 @@ class PsMapBufferedWindow(wx.Window):
|
|
|
page = PageSetup(id = self.pageId)
|
|
|
self.instruction.AddInstruction(page)
|
|
|
|
|
|
- ppi = wx.PaintDC(self).GetPPI()
|
|
|
+ ppi = wx.ClientDC(self).GetPPI()
|
|
|
cW, cH = self.GetClientSize()
|
|
|
pW, pH = page['Width']*ppi[0], page['Height']*ppi[1]
|
|
|
|
|
@@ -1551,7 +1551,7 @@ class PsMapBufferedWindow(wx.Window):
|
|
|
pdc.DrawRectangle(*bb)
|
|
|
|
|
|
if pdctype == 'rectText':
|
|
|
- dc = wx.PaintDC(self) # dc created because of method GetTextExtent, which pseudoDC lacks
|
|
|
+ dc = wx.ClientDC(self) # dc created because of method GetTextExtent, which pseudoDC lacks
|
|
|
font = self.font
|
|
|
size = 10
|
|
|
font.SetPointSize(size)
|