Ejemplo n.º 1
0
        public void rotozoomSurface()
        {
            this.InitSdl();
            Sdl.SDL_Rect rect1          = new Sdl.SDL_Rect(0, 0, 400, 400);
            Sdl.SDL_Rect rect2          = new Sdl.SDL_Rect(0, 0, 400, 400);
            IntPtr       bmpImagePtr    = Sdl.SDL_LoadBMP("test.bmp");
            IntPtr       rotoSurfacePtr = SdlGfx.rotozoomSurface(bmpImagePtr, 90, 2, SdlGfx.SMOOTHING_OFF);

            Sdl.SDL_BlitSurface(rotoSurfacePtr, ref rect1, surfacePtr, ref rect2);
            Assert.IsNotNull(rotoSurfacePtr);
            Assert.IsFalse(rotoSurfacePtr == IntPtr.Zero);
            Sdl.SDL_UpdateRect(surfacePtr, 0, 0, 400, 400);

            //int results = Sdl.SDL_Flip(surfacePtr);
            Thread.Sleep(sleepTime);
        }