Ejemplo n.º 1
0
 def test_IMG_Linked_Version(self):
     v = sdlimage.IMG_Linked_Version()
     self.assertIsInstance(v.contents, version.SDL_version)
     self.assertEqual(v.contents.major, 2)
     self.assertEqual(v.contents.minor, 0)
     self.assertGreaterEqual(v.contents.patch, 0)
Ejemplo n.º 2
0
import os
import sys
import ctypes
import unittest
import pytest
from sdl2 import SDL_Init, SDL_Quit, version, surface, rwops, render

try:
    from sdl2 import sdlimage
    _HASSDLIMAGE=True
    v = sdlimage.IMG_Linked_Version().contents
    libversion = v.major * 1000 + v.minor * 100 + v.patch
except:
    _HASSDLIMAGE=False

is32bit = sys.maxsize <= 2**32
ismacos = sys.platform == "darwin"

formats = ["bmp",
           "cur",
           "gif",
           "ico",
           "jpg",
           "lbm",
           "pbm",
           "pcx",
           "pgm",
           "png",
           "pnm",
           "ppm",
           "svg",