Commits

Anonymous committed 4d7855d

Release 0.03. Fixes to test programs to match updated api.

Comments (0)

Files changed (5)

    numpy arrays or any other sequence.
  - Implemented SDL_CreateRGSurfaceFrom
  - added test programs test/testpalette.py and test/testgamma.py
+ - filled holes in test/testvidinfo.py
  - __copy__ and __deepcopy__ methods added to SDL_Colour and SDL_Rect
  - Constants and enums in keysym.py moved into constants.py
  - SDL_keysym.unicode is now a unicode string type, not integer
 include test/sample.bmp
+include test/sail.bmp
 include test/*.py
 include unit/*.py
 include support/*.py
 
 1. Increment revision numbers in ``setup.py`` and ``doc/manual.txt``, and
    ensure ``CHANGELOG`` is up to date.
-2. Generate user documentation (requires ``mkhowto`` from the Python source
+2. Update ``doc/index.txt`` and generate ``index.html`` with::
+
+      python setup.py doc
+
+3. Generate user documentation (requires ``mkhowto`` from the Python source
    and `Python LaTeX Writer
    <http://www.rexx.com/~dkuhlman/rstpythonlatex_intro.html>`_::
 
       python setup.py manual
 
-3. Generate API documentation (requires `Epydoc
+4. Generate API documentation (requires `Epydoc
    <http://epydoc.sourceforge.net>`_ 3.0 alpha or later)::
 
       python setup.py apidoc
 
-4. Generate snapshot::
+5. Generate snapshot::
 
       python setup.py sdist
 

test/pixels_numpy.py

             g = add(g, c * w.color[1])
             b = add(b, c * w.color[2])
 
-        r = clip(r*0xff, 0, 0xff).astype(Int32) << 16
-        g = clip(g*0xff, 0, 0xff).astype(Int32) << 8 
-        b = clip(b*0xff, 0, 0xff).astype(Int32)
+        r = clip(r*0xff, 0, 0xff).astype(UInt32) << 16
+        g = clip(g*0xff, 0, 0xff).astype(UInt32) << 8 
+        b = clip(b*0xff, 0, 0xff).astype(UInt32)
 
         pixels[:] = bitwise_or(r, bitwise_or(g, b)).flat
 
 class SDL_Video_MapTest(SDL_Video_TestCase):
     def testMapRGB(self):
         info = SDL_GetVideoInfo()
-        pf = info.vfmt.contents
+        pf = info.vfmt
         for t in [(0, 0, 0),
                   (255, 0, 0),
                   (0xde, 0xea, 0xbe)]:
     def testMapRGBA(self):
         # TODO init a surface w/ alpha so can test this properly
         info = SDL_GetVideoInfo()
-        pf = info.vfmt.contents
+        pf = info.vfmt
         for t in [(0, 0, 0, 255),
                   (255, 0, 0, 255),
                   (255, 255, 255, 255),