Port gdi04c to New Lua
Merge pull request #6325 from obrakmann/gdi04c

Port gdi04c to New Lua