GdiTest.Win32GDI.GetPixelColor C# (CSharp) Méthode

GetPixelColor() public méthode

public GetPixelColor ( IntPtr hdc, int X, int Y ) : System.Drawing.Color
hdc System.IntPtr
X int
Y int
Résultat System.Drawing.Color
        public System.Drawing.Color GetPixelColor(IntPtr hdc, int X, int Y)
        {
            int pixel = Callbacks.GetPixel(hdc, X, Y);
            System.Drawing.Color color = System.Drawing.Color.FromArgb((int)(pixel & 0x000000FF),
                                         (int)(pixel & 0x0000FF00) >> 8,
                                         (int)(pixel & 0x00FF0000) >> 16);
            return color;
        }