projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
forcefully disable wxUSE_STD_STRING and wxUSE_STL for Digital Mars and Open Watcom
[wxWidgets.git]
/
wxPython
/
wx
/
lib
/
fancytext.py
diff --git
a/wxPython/wx/lib/fancytext.py
b/wxPython/wx/lib/fancytext.py
index 16e4a5e8b320194a2b511d390c7ce2029c276924..df7772e94b0697c77f2d0eac29f5c4dedde0bbbb 100644
(file)
--- a/
wxPython/wx/lib/fancytext.py
+++ b/
wxPython/wx/lib/fancytext.py
@@
-350,6
+350,9
@@
def GetFullExtent(str, dc=None, enclose=True):
def RenderToBitmap(str, background=None, enclose=1):
"Return str rendered on a minumum size bitmap"
dc = wx.MemoryDC()
def RenderToBitmap(str, background=None, enclose=1):
"Return str rendered on a minumum size bitmap"
dc = wx.MemoryDC()
+ # Chicken and egg problem, we need a bitmap in the DC in order to
+ # measure how big the bitmap should be...
+ dc.SelectObject(wx.EmptyBitmap(1,1))
width, height, dy = GetFullExtent(str, dc, enclose)
bmp = wx.EmptyBitmap(width, height)
dc.SelectObject(bmp)
width, height, dy = GetFullExtent(str, dc, enclose)
bmp = wx.EmptyBitmap(width, height)
dc.SelectObject(bmp)