How do I convert between the GeoColor class and System.Drawing.Color?
I have some standard Wondows controls I need to set the BackColor on to be the same as an AreaStyle.FillSolidBrush.Color...
Dave
How do I convert between the GeoColor class and System.Drawing.Color?
I have some standard Wondows controls I need to set the BackColor on to be the same as an AreaStyle.FillSolidBrush.Color...
Dave
David,
Thanks for your post.
It’s very easy so we don’t provide API to do it, the code is just one line:
Color color = Color.FromArgb(geoColor.AlphaComponent, geoColor.RedComponent, geoColor.GreenComponent, geoColor.BlueComponent);
Let me know if you have more questions.
Thanks
James
The same idea from color to geoColor:
GeoColor geoColor = new GeoColor(color.A, color.R, color.G, color.B);
Ok, that's the way I did it while I waited for your answer. Just didn't know if there was a more 'official' way to do that or not.
That way is certainly fine with me...
Dave
Dave,
Thanks for your post and question, I think that is a good way to go.
Any more questions please do not hesitate to let me know.
Thanks.
Yale