jonathan: thuban/test test_baserenderer.py, 1.10, 1.11 test_layer.py, 1.34, 1.35

Jonathan Coles jonathan at jpcoles.com
Thu Feb 17 14:00:54 CET 2005


Am Donnerstag, den 17.02.2005, 11:39 +0100 schrieb Bernhard Herzog:
> cvs at intevation.de writes:
> 
> > Index: test_baserenderer.py
> [...]
> > +        if versions['wxPython-tuple'] < (2,5,3):
> > +            raw_mask = binascii.a2b_base64(
> > +                'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
> > +                'AAAAAAAAAAAAAAAAAAA\n')
> > +        else:
> > +            raw_mask = binascii.a2b_base64(
> > +                '//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P//8P/'
> > +                '/8P//8P//8P//8P//8P\n')
> 
> Why does this depend on the wx Version?  Baserenderer must not depend on
> any GUI library specific things.

according to the wx2.4 documentation about wxMask for a wxBitmap:

"the masked area is black and the unmasked area is white. When
associated with a bitmap and drawn in a device context, the unmasked
area of the bitmap will be drawn, and the masked area will not be
drawn."

this says to me, make the portions of the mask that i want drawn 1's and
the other portions 0's. this is *not* the behavior under wx2.4. it is
reversed. under wx2.5 the problem has been corrected (and i had to
change the gdalwarp code to create a correct bitmap mask) so the results
are going to be different.

i understand why baserenderer shouldn't depend on wx, but the output
unfortunately is for the moment. also, aren't we implicitly depending on
wx for some of the other tests that check which DC calls were made?

is there a better way i should do this?

--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)