示例#1
0
        // Windows values are in BGR format and without alpha
        // so we force it to opaque (or everything will be transparent) and reverse B and R
        static uint GetSysColor(GetSysColorIndex index)
        {
            uint bgr = GDIPlus.Win32GetSysColor(index);

            return(0xFF000000 | (bgr & 0xFF) << 16 | (bgr & 0xFF00) | (bgr >> 16));
        }
示例#2
0
		// Windows values are in BGR format and without alpha
		// so we force it to opaque (or everything will be transparent) and reverse B and R
		static uint GetSysColor (GetSysColorIndex index)
		{
			uint bgr = GDIPlus.Win32GetSysColor (index);
			return 0xFF000000 | (bgr & 0xFF) << 16 | (bgr & 0xFF00) | (bgr >> 16);
		}
示例#3
0
		public static extern uint Win32GetSysColor (GetSysColorIndex index);
示例#4
0
 public static extern uint Win32GetSysColor(GetSysColorIndex index);
示例#5
0
文件: TestColor.cs 项目: GirlD/mono
		private void Compare (KnownColor kc, GetSysColorIndex index)
		{
			// we get BGR than needs to be converted into ARGB
			Color sc = ColorTranslator.FromWin32 ((int)GDIPlus.Win32GetSysColor (index));
			Assert.AreEqual (Color.FromKnownColor (kc).ToArgb (), sc.ToArgb (), kc.ToString ());
		}
示例#6
0
        // Windows values are in BGR format and without alpha
        // so we force it to opaque (or everything will be transparent) and reverse B and R
        static uint GetSysColor(GetSysColorIndex index)
        {
            uint bgr = SafeNativeMethods.Gdip.Win32GetSysColor(index);

            return(0xFF000000 | (bgr & 0xFF) << 16 | (bgr & 0xFF00) | (bgr >> 16));
        }