Пример #1
0
        public void zoomSurface()
        {
            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       zoomSurfacePtr = SdlGfx.zoomSurface(bmpImagePtr, 5, 2, SdlGfx.SMOOTHING_OFF);

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

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