It's the SetGadgetLayout command that's causing the problem and specifically EDGE_ALIGNED/RELATIVE as CENTRED works ok.
P.S. You should always Setgraphics again in your gadgetpaint select.
Setgadgetlayout
<EDIT> In fact if you specify EDGE_ALIGNED,0,EDGE_ALIGNED,0 the problem doesn't occur.
P.S. You should always Setgraphics again in your gadgetpaint select.
Setgadgetlayout
<EDIT> In fact if you specify EDGE_ALIGNED,0,EDGE_ALIGNED,0 the problem doesn't occur.