Package org.bioapi

Examples of org.bioapi.GUIImageObserver$Bitmap


      alpha = data.alpha;
      alphaData = data.alphaData;
      transparentPixel = data.transparentPixel;
      break;
    }
    BITMAP bm = new BITMAP();
    Extension.GetObject(hBitmap, BITMAP.sizeof, bm);
    int imgWidth = bm.bmWidth;
    int imgHeight = bm.bmHeight;
    int /* long */hDC = Extension.GetDC(0);
    int /* long */srcHdc = Extension.CreateCompatibleDC(hDC);
    int /* long */oldSrcBitmap = Extension.SelectObject(srcHdc, hBitmap);
    int /* long */memHdc = Extension.CreateCompatibleDC(hDC);
    BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
    bmiHeader.biSize = BITMAPINFOHEADER.sizeof;
    bmiHeader.biWidth = imgWidth;
    bmiHeader.biHeight = -imgHeight;
    bmiHeader.biPlanes = 1;
    bmiHeader.biBitCount = (short) 32;
    bmiHeader.biCompression = Extension.BI_RGB;
    byte[] bmi = new byte[BITMAPINFOHEADER.sizeof];
    Extension.MoveMemory(bmi, bmiHeader, BITMAPINFOHEADER.sizeof);
    int /* long */[] pBits = new int /* long */[1];
    int /* long */memDib = Extension.CreateDIBSection(0, bmi, Extension.DIB_RGB_COLORS,
        pBits, 0, 0);
    if (memDib == 0)
      SWT.error(SWT.ERROR_NO_HANDLES);
    int /* long */oldMemBitmap = Extension.SelectObject(memHdc, memDib);
    BITMAP dibBM = new BITMAP();
    Extension.GetObject(memDib, BITMAP.sizeof, dibBM);
    int sizeInBytes = dibBM.bmWidthBytes * dibBM.bmHeight;
    Extension.BitBlt(memHdc, 0, 0, imgWidth, imgHeight, srcHdc, 0, 0, Extension.SRCCOPY);
    byte red = 0, green = 0, blue = 0;
    if (transparentPixel != -1) {
View Full Code Here

TOP

Related Classes of org.bioapi.GUIImageObserver$Bitmap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.