Exemple #1
0
 public BitmapPlus FromHBITMAP(
     HBITMAP hbm,
     IntPtr hpal
     )
 {
     return(new BitmapPlus(hbm, hpal));
 }
Exemple #2
0
 public GpStatus GetHBITMAP(
     Color colorBackground,
     out HBITMAP hbmReturn
     )
 {
     return(SetStatus(NativeMethods.GdipCreateHBITMAPFromBitmap(
                          (GpBitmap)(IntPtr)nativeImage,
                          out hbmReturn,
                          colorBackground.ToArgb())));
 }
Exemple #3
0
/*
 * public Bitmap(
 *  BITMAPINFO* gdiBitmapInfo,
 *  VOID* gdiBitmapData
 *  )
 * {
 *  GpBitmap bitmap = new GpBitmap();
 *
 *  lastResult = NativeMethods.GdipCreateBitmapFromGdiDib(gdiBitmapInfo,
 *                                                      gdiBitmapData,
 *                                                      out bitmap);
 *
 *  SetNativeImage((GpImage)(IntPtr)bitmap);
 * }
 */

        public BitmapPlus(
            HBITMAP hbm,
            IntPtr hpal
            )
        {
            GpBitmap bitmap = new GpBitmap();

            lastResult = NativeMethods.GdipCreateBitmapFromHBITMAP(hbm, hpal, out bitmap);

            SetNativeImage((GpImage)(IntPtr)bitmap);
        }
Exemple #4
0
 GdipCreateHBITMAPFromBitmap(GpBitmap bitmap,
                             out HBITMAP hbmReturn,
                             int background);