The GImage type has a function GImage::scale that scales the image. When the image is scaled, it is drawn on the screen at the wrong coordinates; it seems like the x and y coordinates of the image are also scaled by the scale factor. The rendering code might need to invert the scale transform on the x and y coordinates before first drawing things.