goImage Background color

Just wondering if you can think of a way to change to backcolor of an image used in a goIconicNode using code. For example if I put an image on a web page I can code something like:
Image1.BackColor = System.Drawing.Color.Red;
Is there a way to do that to the iconic node image?

Your image has transparent pixels in it, right?
I suppose you could have a GoRectangle behind it colored the way you want.
Or you could override GoImage.Paint to first fill the area of the image with your desired background color.

I have it is problem too. How override GoIconicNide.Image property, to set my own class inherited from GoImage. I can`t do background color to GoIconicNode

I want set background color to GoIconicNode. I`m override GoIconicNode.Paint and pain rounded rectangle, but it put on GoIconicNode. And now looks that:

How I can set background color to GoIconicNode???

What I do wrong?


I’m going to echo Walter’s earlier comment. Why not just use transparent background in your icons? Once you do that, putting a color behind the icon is easy. (See the 5-pointed star in Demo1…)