recent changes
Jonathan Coles
jonathan at jpcoles.com
Sat Jan 29 21:08:24 CET 2005
Am Samstag, den 29.01.2005, 14:50 -0500 schrieb Russell Nelson:
> Jonathan Coles writes:
> > 1) instead of drawing the raster data in data[2][0], just try drawing
> > the bitmap returned from wxBitmapFromBits().
>
> Couldn't get multiple attempts to work. Kept getting a segmentation
> fault. Tried running gdb on it, but it didn't tell me anything
> particularly useful other than that the problem was in
> wxBitmapFromImage().
you don't need to call wxBitmapFromImage. here's a quick diff to do what
i'm talking about (maybe you already tried this):
Index: renderer.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/renderer.py,v
retrieving revision 1.56
diff -r1.56 renderer.py
109a110
> bitmap = None
115,116c116,117
< mask = wxBitmapFromBits(data[2][1], data[0], data[1],
1)
< mask = wxMask(mask)
---
> bitmap = wxBitmapFromBits(data[2][1], data[0],
data[1], 1)
> #mask = wxMask(mask)
125,126c126,127
< bitmap = wxBitmapFromImage(image)
< bitmap.SetMask(mask)
---
> #bitmap = wxBitmapFromImage(image)
> #bitmap.SetMask(mask)
128c129,130
< self.dc.DrawBitmap(bitmap, int(round(x)), int(round(y)), True)
---
> if bitmap is not None:
> self.dc.DrawBitmap(bitmap, int(round(x)), int(round(y)),
True)
> Something is still wrong, but I think it's not in Thuban.
in a way, i hope so. but on the other hand, it's harder to fix if it's
not :)
--jonathan
--
=====================================================================
Jonathan Coles http://www.jpcoles.com
jonathan at jpcoles.com GnuPG Key: /gpg_pub_key.asc
=====================================================================
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)