This ends up centered by width but is off by height. What am I doing wrong?... I can't spot it.
SuperStrict Import MaxGui.Drivers Local W:Int = 640, H:Int = 480 Local MyWindow:TGadget=CreateWindow("Panel Background Image", 200,200,W,H) Local Panel2D:TGadget=CreatePanel(W/4,H/4,W/2,H/2, MyWindow,PANEL_GROUP ) Local image:TPixmap=LoadPixmap("B-max.png") 'SetGadgetPixmap Panel2D, image, PANELPIXMAP_STRETCH Repeat WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End End Select Forever