The results, for what it's worth, were:
Code: Select all
GFXLIB2: 941 cs
GDIPLUS: 866 cs
Code: Select all
REM Program to compare performance of GFXLIB2 and GDIPLUS with image rotation
REM As a proxy for GFXLIB2 the program uses PROC_gfxPlot2 from BOX2DGFX (this
REM is effectively the same code as in GFXLIB2's PlotRotateScaleBilinear.bbc)
REM and for GDI+ it uses PROC_imgPlot from IMGLIB which is also Bilinear mode
VDU 23,22,640;500;8,16,16,128
REM Load libraries:
INSTALL @lib$ + "BOX2DGFX"
INSTALL @lib$ + "IMGLIB"
img$ = "C:\users\richard\onedrive\bbcbasic\sdl32\source\bbc256x.png"
REM GFXLIB2 method:
PROC_gfxInit(g{}, 640, 500, 1.0)
PROC_gfxLoad(i{}, img$, 1.0)
TIME = 0
FOR a = 0 TO 2 * PI STEP 2 * PI / 10000
PROC_gfxPlot2(g{}, i{}, 320, 250, a)
NEXT
t1% = TIME
SYS "InvalidateRect", @hwnd%, 0, 0
*REFRESH
PROC_gfxExit
REM GDIPLUS method:
PROC_imgInit
i% = FN_imgLoad(img$)
TIME = 0
FOR a = 0 TO -360 STEP -360 / 10000
PROC_imgPlot(i%, 640, 500, 1.0, a, FALSE)
NEXT
t2% = TIME
SYS "InvalidateRect", @hwnd%, 0, 0
*REFRESH
PROC_imgExit
PRINT "GFXLIB2: "; t1%
PRINT "GDIPLUS: "; t2%