denzilquixode #1 The problem is graphicswidth() and graphicsheight() are being called before graphics() - globals inside types are initialised first, before any code is run.