Hi,
I have a custom class (dll) that I use to draw line graphs with by feeding it a collection of (custom GraphData) plotline collections.
As I add a new PlotLine collection to the GraphData collection it is allocated a drawing color from an array of System.Drawing.Color.
When the user clicks a line on the Graph I get the color of the pixel clicked on using GetPixel which returns a System.Drawing.Color.
However, when I try to do an equals on this it never works as the name of the Color returned by GetPixel is in the format of "aarrggbb"
Now, as far as I'm concerned the Name() of the color returned should be identical to the name of the color used to draw the line, but in this instance it's not. If I stop the code as it tries to do a comparison I get "Blue" from my System.Drawing.Color array and "ff0000ff" from my GetPixel() System.Drawing.Color!
Can anyone shed some light on this please.
I have a custom class (dll) that I use to draw line graphs with by feeding it a collection of (custom GraphData) plotline collections.
As I add a new PlotLine collection to the GraphData collection it is allocated a drawing color from an array of System.Drawing.Color.
When the user clicks a line on the Graph I get the color of the pixel clicked on using GetPixel which returns a System.Drawing.Color.
However, when I try to do an equals on this it never works as the name of the Color returned by GetPixel is in the format of "aarrggbb"
Now, as far as I'm concerned the Name() of the color returned should be identical to the name of the color used to draw the line, but in this instance it's not. If I stop the code as it tries to do a comparison I get "Blue" from my System.Drawing.Color array and "ff0000ff" from my GetPixel() System.Drawing.Color!
Can anyone shed some light on this please.