' Put Flipped! v1.0 ' (C) 2008 Innova and Kristopher Windsor ' ' Fast Put() Alternative with Horizontal / Vertical Flipping - freebasic.net ' https://www.freebasic.net/forum/viewtopic.php?t=11374 #include once "fbgfx.bi" #include once "putflipped.bi" Screenres 800, 600, 32 ' Create sample image Function CreateSampleImage() As fb.image Ptr Dim As fb.image Ptr graphic = ImageCreate(320, 240, &HFFFFFFFF) For i As Integer = 1 To 10000 Dim As Integer x = Rnd * 320 Dim As Integer y = Rnd * 240 Dim As Integer r = Rnd * 32 Dim As ulong col = Rgb(Rnd * 256, Rnd * 256, Rnd * 256) If Rnd < 0.5 Then col = RGB(255, 0, 255) Circle graphic, (x, y), r, col, , , , F Next i Line graphic, (0, 0) - (319, 239), &HFF88FF88, B '1px border for clipping tests Return graphic End Function ' main Dim As fb.image Ptr graphic = CreateSampleImage() Dim As Integer mx, my, mb ' main loop Do Getmouse mx, my,, mb Screenlock color RGB(40, 80, 160), RGB(40, 80, 160) Cls putflipped(graphic, mx - 160, my - 120, (mb And 1) > 0, (mb And 2) > 0) Screenunlock Sleep 10 Loop Until Inkey = Chr(27) ImageDestroy(graphic)