I am converting by hand a code from Java to C#, and I don't know how to convert
private static int rosu = Color.Red.getRGB;
|
I get this error:
'System.Drawing.Color' does not contain a definition for 'getRGB' and no extension method 'getRGB' accepting a first argument of type 'System.Drawing.Color' could be found (are you missing a using directive or an assembly reference?)
|
I use the declared "rosu" in this context:
for (uy=0;uy<h;uy++) for (ux=0;ux<w;ux++) if(curba[uy][ux]==255) curba[uy][ux]=rosu; |
Thank you
FroglegPosted Jan 23, 2011, 2:08 AM
private static int rosu;// need blue & green
Color myColor;
private void Form1_Load(object sender, EventArgs e)
{
myColor = Color.Red;
rosu = myColor.R;// myColor.B = blue component, myColor.G = green component ,myColor.A = alpha component - value = 0 to 255
}