refactor graphics.napus