egra: prepare agg mini before calling `onPaint()` (and cleanup afterwards)