port gdi03 to the new Lua API