Melinda,
Thanks for your suggestion, I think this should be the way to go. Unfortunately reality is tougher, and I couldn't find an event that is triggered 'at the right moment'.
I ended up drawing the feature's swatch manually on top of the generated image. Since in my case they are always point features, that's not too hard.