Esempio n. 1
0
    // Token: 0x0600024C RID: 588 RVA: 0x01036604 File Offset: 0x01034804
    public void method_1(Bitmap bitmap_0, int int_4)
    {
        if (bitmap_0.PixelFormat != PixelFormat.Format32bppArgb)
        {
            throw new ApplicationException("The bitmap must be 32bpp with alpha-channel.");
        }
        IntPtr dc      = PerPixelAlphaForm.GetDC(IntPtr.Zero);
        IntPtr intPtr  = PerPixelAlphaForm.CreateCompatibleDC(dc);
        IntPtr intPtr2 = IntPtr.Zero;
        IntPtr intptr_ = IntPtr.Zero;

        try
        {
            intPtr2 = bitmap_0.GetHbitmap(Color.FromArgb(0));
            intptr_ = PerPixelAlphaForm.SelectObject(intPtr, intPtr2);
            PerPixelAlphaForm.Struct7 @struct = new PerPixelAlphaForm.Struct7(bitmap_0.Width, bitmap_0.Height);
            PerPixelAlphaForm.Struct6 struct2 = new PerPixelAlphaForm.Struct6(0, 0);
            PerPixelAlphaForm.Struct6 struct3 = new PerPixelAlphaForm.Struct6(base.Left, base.Top);
            PerPixelAlphaForm.Struct9 struct4 = default(PerPixelAlphaForm.Struct9);
            struct4.byte_0 = 0;
            struct4.byte_1 = 0;
            struct4.byte_2 = (byte)int_4;
            struct4.byte_3 = 1;
            PerPixelAlphaForm.UpdateLayeredWindow(this.method_3(), dc, ref struct3, ref @struct, intPtr, ref struct2, 0, ref struct4, 2);
        }
        finally
        {
            PerPixelAlphaForm.ReleaseDC(IntPtr.Zero, dc);
            if (intPtr2 != IntPtr.Zero)
            {
                PerPixelAlphaForm.SelectObject(intPtr, intptr_);
                PerPixelAlphaForm.DeleteObject(intPtr2);
            }
            PerPixelAlphaForm.DeleteDC(intPtr);
        }
    }
Esempio n. 2
0
 private static extern bool UpdateLayeredWindow(IntPtr intptr_0, IntPtr intptr_1, ref PerPixelAlphaForm.Struct6 struct6_0, ref PerPixelAlphaForm.Struct7 struct7_0, IntPtr intptr_2, ref PerPixelAlphaForm.Struct6 struct6_1, int int_4, ref PerPixelAlphaForm.Struct9 struct9_0, int int_5);