• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java HDC类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.jna.platform.win32.WinDef.HDC的典型用法代码示例。如果您正苦于以下问题:Java HDC类的具体用法?Java HDC怎么用?Java HDC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HDC类属于com.sun.jna.platform.win32.WinDef包,在下文中一共展示了HDC类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getIcon

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * Gets the icon that corresponds to a given icon handler.
 * 
 * @param hIcon
 *            Handler to the icon to get
 * @return The icon that corresponds to a given icon handler
 */
public static BufferedImage getIcon(final HICON hIcon) {
	final int width = ICON_SIZE;
	final int height = ICON_SIZE;
	final short depth = ICON_DEPTH;
	final BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);

	final Memory lpBitsColor = new Memory(width * height * depth / ICON_BYTE_SIZE);
	final Memory lpBitsMask = new Memory(width * height * depth / ICON_BYTE_SIZE);
	final BITMAPINFO info = new BITMAPINFO();
	final BITMAPINFOHEADER hdr = new BITMAPINFOHEADER();
	info.bmiHeader = hdr;
	hdr.biWidth = width;
	hdr.biHeight = height;
	hdr.biPlanes = 1;
	hdr.biBitCount = depth;
	hdr.biCompression = WinGDI.BI_RGB;

	final HDC hDC = User32.INSTANCE.GetDC(null);
	final ICONINFO piconinfo = new ICONINFO();
	User32.INSTANCE.GetIconInfo(hIcon, piconinfo);

	GDI32.INSTANCE.GetDIBits(hDC, piconinfo.hbmColor, 0, height, lpBitsColor, info, WinGDI.DIB_RGB_COLORS);
	GDI32.INSTANCE.GetDIBits(hDC, piconinfo.hbmMask, 0, height, lpBitsMask, info, WinGDI.DIB_RGB_COLORS);

	int r, g, b, a, argb;
	int x = 0, y = height - 1;
	for (int i = 0; i < lpBitsColor.size(); i = i + 3) {
		b = lpBitsColor.getByte(i) & 0xFF;
		g = lpBitsColor.getByte(i + 1) & 0xFF;
		r = lpBitsColor.getByte(i + 2) & 0xFF;
		a = 0xFF - lpBitsMask.getByte(i) & 0xFF;

		argb = a << 24 | r << 16 | g << 8 | b;
		image.setRGB(x, y, argb);
		x = (x + 1) % width;
		if (x == 0) {
			y--;
		}
	}

	User32.INSTANCE.ReleaseDC(null, hDC);
	GDI32.INSTANCE.DeleteObject(piconinfo.hbmColor);
	GDI32.INSTANCE.DeleteObject(piconinfo.hbmMask);

	return image;
}
 
开发者ID:ZabuzaW,项目名称:Mem-Eater-Bug,代码行数:54,代码来源:User32Util.java


示例2: capture

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public BufferedImage capture(final HWND hWnd) {

        final HDC hdcWindow = User32.INSTANCE.GetDC(hWnd);
        final HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(hdcWindow);

        final RECT bounds = new RECT();
        User32Extra.INSTANCE.GetClientRect(hWnd, bounds);

        final int width = bounds.right - bounds.left;
        final int height = bounds.bottom - bounds.top;
        if (width * height <= 0) { return null; }
        final HBITMAP hBitmap = GDI32.INSTANCE.CreateCompatibleBitmap(hdcWindow, width, height);

        final HANDLE hOld = GDI32.INSTANCE.SelectObject(hdcMemDC, hBitmap);
        GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, hdcWindow, 0, 0, WinGDIExtra.SRCCOPY);

        GDI32.INSTANCE.SelectObject(hdcMemDC, hOld);
        GDI32.INSTANCE.DeleteDC(hdcMemDC);

        final BITMAPINFO bmi = new BITMAPINFO();
        bmi.bmiHeader.biWidth = width;
        bmi.bmiHeader.biHeight = -height;
        bmi.bmiHeader.biPlanes = 1;
        bmi.bmiHeader.biBitCount = 32;
        bmi.bmiHeader.biCompression = WinGDI.BI_RGB;

        final Memory buffer = new Memory(width * height * 4);
        GDI32.INSTANCE.GetDIBits(hdcWindow, hBitmap, 0, height, buffer, bmi, WinGDI.DIB_RGB_COLORS);

        final BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
        image.setRGB(0, 0, width, height, buffer.getIntArray(0, width * height), 0, width);

        GDI32.INSTANCE.DeleteObject(hBitmap);
        User32.INSTANCE.ReleaseDC(hWnd, hdcWindow);

        return image;

    }
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:39,代码来源:Paint.java


示例3: main

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * @param args (ignored)
 */
public static void main(String[] args)
{
	System.out.println("Installed Physical Monitors: " + User32.INSTANCE.GetSystemMetrics(WinUser.SM_CMONITORS));
	
	User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {

		@Override
		public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam)
		{
			enumerate(hMonitor);

			return 1;
		}
		
	}, new LPARAM(0));
}
 
开发者ID:msteiger,项目名称:MonitorBrightness,代码行数:20,代码来源:MonitorInfoDemo.java


示例4: getScreenshot

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public static BufferedImage getScreenshot( final Rectangle bounds ) {
	HDC windowDC = GDI.GetDC( USER.GetDesktopWindow() );
	HBITMAP outputBitmap = GDI.CreateCompatibleBitmap( windowDC, bounds.width, bounds.height );
	try {
		HDC blitDC = GDI.CreateCompatibleDC( windowDC );
		try {
			HANDLE oldBitmap = GDI.SelectObject( blitDC, outputBitmap );
			try {
				GDI.BitBlt( blitDC, 0, 0, bounds.width, bounds.height, windowDC, bounds.x, bounds.y, GDI32.SRCCOPY );
			} finally {
				GDI.SelectObject( blitDC, oldBitmap );
			}
			BITMAPINFO bi = new BITMAPINFO( 40 );
			bi.bmiHeader.biSize = 40;
			boolean ok = GDI.GetDIBits( blitDC, outputBitmap, 0, bounds.height, (byte[]) null, bi, WinGDI.DIB_RGB_COLORS );
			if ( ok ) {
				BITMAPINFOHEADER bih = bi.bmiHeader;
				bih.biHeight = -Math.abs( bih.biHeight );
				bi.bmiHeader.biCompression = 0;
				return bufferedImageFromBitmap( blitDC, outputBitmap, bi );
			} else
				return null;
		} finally {
			GDI.DeleteObject( blitDC );
		}
	} finally {
		GDI.DeleteObject( outputBitmap );
	}
}
 
开发者ID:icza,项目名称:sc2gears,代码行数:30,代码来源:OrigJNAScreenShot.java


示例5: MonitorControllerJna

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public MonitorControllerJna()
{
	System.out.println("Monitors: " + User32.INSTANCE.GetSystemMetrics(User32.SM_CMONITORS));
	
	User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {

		@Override
		public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam)
		{
			System.out.println("Monitor handle: " + hMonitor);

			MONITORINFOEX info = new MONITORINFOEX();
			User32.INSTANCE.GetMonitorInfo(hMonitor, info);
			System.out.println(info.rcMonitor);
			
			DWORDByReference pdwNumberOfPhysicalMonitors = new DWORDByReference();
			Dxva2.INSTANCE.GetNumberOfPhysicalMonitorsFromHMONITOR(hMonitor, pdwNumberOfPhysicalMonitors);
			int monitorCount = pdwNumberOfPhysicalMonitors.getValue().intValue();
			
			System.out.println("Physical monitors for " + hMonitor + ": " + monitorCount);
			
			PHYSICAL_MONITOR[] physMons = new PHYSICAL_MONITOR[monitorCount];
			Dxva2.INSTANCE.GetPhysicalMonitorsFromHMONITOR(hMonitor, monitorCount, physMons);
			
			for (PHYSICAL_MONITOR mon : physMons)
			{
				String desc = new String(mon.szPhysicalMonitorDescription);
				monitors.add(new MonitorJna(mon.hPhysicalMonitor, desc));
			}
			
			return 1;
		}
	}, new LPARAM(0));
}
 
开发者ID:msteiger,项目名称:MonitorBrightness,代码行数:35,代码来源:MonitorControllerJna.java


示例6: getImageByHICON

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public static BufferedImage getImageByHICON(final int width, final int height, final HANDLE hicon, final BITMAPINFOHEADER info) {
    final IconInfo iconinfo = new org.appwork.jna.winapi.structs.IconInfo();

    try {
        // GDI32 g32 = GDI32.INSTANCE;

        // get icon information

        if (!User.I.GetIconInfo(new HICON(hicon.getPointer()), iconinfo)) { return null; }
        final HWND hwdn = new HWND();
        final HDC dc = User32.INSTANCE.GetDC(hwdn);

        if (dc == null) {

        return null; }
        try {
            final int nBits = width * height * 4;
            // final BitmapInfo bmi = new BitmapInfo(1);

            final Memory colorBitsMem = new Memory(nBits);
            // // Extract the color bitmap
            final BITMAPINFO bmi = new WinGDI.BITMAPINFO();

            bmi.bmiHeader.biWidth = width;
            bmi.bmiHeader.biHeight = -height;
            bmi.bmiHeader.biPlanes = 1;
            bmi.bmiHeader.biBitCount = 32;
            bmi.bmiHeader.biCompression = WinGDI.BI_RGB;
            GDI32.INSTANCE.GetDIBits(dc, iconinfo.hbmColor, 0, height, colorBitsMem, bmi, WinGDI.DIB_RGB_COLORS);
            // g32.GetDIBits(dc, iconinfo.hbmColor, 0, size, colorBitsMem,
            // bmi,
            // GDI32.DIB_RGB_COLORS);
            final int[] colorBits = colorBitsMem.getIntArray(0, width * height);
            if (info.biBitCount < 32) {
                final Memory maskBitsMem = new Memory(nBits);
                // // Extract the mask bitmap
                GDI32.INSTANCE.GetDIBits(dc, iconinfo.hbmMask, 0, height, maskBitsMem, bmi, WinGDI.DIB_PAL_COLORS);
                // g32.GetDIBits(dc, iconinfo.hbmMask, 0, size,
                // maskBitsMem,
                // bmi,
                // // GDI32.DIB_RGB_COLORS);
                final int[] maskBits = maskBitsMem.getIntArray(0, width * height);
                // // // Copy the mask alphas into the color bits
                for (int i = 0; i < colorBits.length; i++) {
                    colorBits[i] = colorBits[i] | (maskBits[i] != 0 ? 0 : 0xFF000000);
                }
            }
            final BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
            bi.setRGB(0, 0, width, height, colorBits, 0, height);
            return bi;
        } finally {
            com.sun.jna.platform.win32.User32.INSTANCE.ReleaseDC(hwdn, dc);
        }
    } finally {
        User32.INSTANCE.DestroyIcon(new HICON(hicon.getPointer()));
        GDI32.INSTANCE.DeleteObject(iconinfo.hbmColor);
        GDI32.INSTANCE.DeleteObject(iconinfo.hbmMask);
    }
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:60,代码来源:Main.java


示例7: getImageByHICON

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public static BufferedImage getImageByHICON(final int width, final int height, final HANDLE hicon) {
    final IconInfo iconinfo = new org.appwork.jna.winapi.structs.IconInfo();

    try {
        // GDI32 g32 = GDI32.INSTANCE;

        // get icon information

        if (!org.appwork.jna.winapi.user32.User.I.GetIconInfo(new HICON(hicon.getPointer()), iconinfo)) { return null; }
        final HWND hwdn = new HWND();
        final HDC dc = User32.INSTANCE.GetDC(hwdn);

        if (dc == null) {

        return null; }
        try {
            final int nBits = width * height * 4;
            // final BitmapInfo bmi = new BitmapInfo(1);

            final Memory colorBitsMem = new Memory(nBits);
            // // Extract the color bitmap
            final BITMAPINFO bmi = new WinGDI.BITMAPINFO();

            bmi.bmiHeader.biWidth = width;
            bmi.bmiHeader.biHeight = -height;
            bmi.bmiHeader.biPlanes = 1;
            bmi.bmiHeader.biBitCount = 32;
            bmi.bmiHeader.biCompression = WinGDI.BI_RGB;
            GDI32.INSTANCE.GetDIBits(dc, iconinfo.hbmColor, 0, height, colorBitsMem, bmi, WinGDI.DIB_RGB_COLORS);
            // g32.GetDIBits(dc, iconinfo.hbmColor, 0, size, colorBitsMem,
            // bmi,
            // GDI32.DIB_RGB_COLORS);
            final int[] colorBits = colorBitsMem.getIntArray(0, width * height);
            // final Memory maskBitsMem = new Memory(nBits);
            // // // Extract the mask bitmap
            // GDI32.INSTANCE.GetDIBits(dc, iconinfo.hbmMask, 0, height,
            // maskBitsMem, bmi, WinGDI.DIB_PAL_COLORS);
            // // g32.GetDIBits(dc, iconinfo.hbmMask, 0, size, maskBitsMem,
            // bmi,
            // // GDI32.DIB_RGB_COLORS);
            // final int[] maskBits = maskBitsMem.getIntArray(0, width *
            // height);
            // // // Copy the mask alphas into the color bits
            // for (int i = 0; i < colorBits.length; i++) {
            // colorBits[i] = colorBits[i] | (maskBits[i] != 0 ? 0 :
            // 0xFF000000);
            // }
            // // Release DC
            // Main.u32.ReleaseDC(0, dc);

            //

            // // Release bitmap handle in icon info
            // g32.DeleteObject(iconinfo.hbmColor); // add
            // g32.DeleteObject(iconinfo.hbmMask); // add

            final BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
            bi.setRGB(0, 0, width, height, colorBits, 0, height);
            return bi;
        } finally {
            com.sun.jna.platform.win32.User32.INSTANCE.ReleaseDC(hwdn, dc);
        }
    } finally {
        User32.INSTANCE.DestroyIcon(new HICON(hicon.getPointer()));
        GDI32.INSTANCE.DeleteObject(iconinfo.hbmColor);
        GDI32.INSTANCE.DeleteObject(iconinfo.hbmMask);
    }
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:69,代码来源:FileIconExporter.java


示例8: _captureAero

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public static BufferedImage _captureAero(HWND hwnd, Rectangle bounds) {
	//RDW_FRAME | RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN 
	int flags = 0x0400 | 0x0001 | 0x0004 | 0x0100 | 0x0080;
	
	HWND tagetHwnd = hwnd;
	
	HDC windowDC = GDI.GetDC(tagetHwnd);
       HBITMAP outputBitmap = GDI.CreateCompatibleBitmap(windowDC, bounds.width, bounds.height);
       
       try{
       	HDC blitDC = GDI.CreateCompatibleDC(windowDC);
       	try{
               HANDLE oldBitmap =
                       GDI.SelectObject(blitDC, outputBitmap);
               
               USER.RedrawWindow(tagetHwnd, null, null, flags);
  
               if(USER.PrintWindow(tagetHwnd, blitDC, 1)){
               	GDI.SelectObject(blitDC, oldBitmap);
               	
               	WinGDI.BITMAPINFO bi = new WinGDI.BITMAPINFO(40);
               	bi.bmiHeader.biSize = 40;
               	boolean ok =
               	         GDI.GetDIBits(blitDC, outputBitmap, 0, bounds.height,
               	         (byte[]) null, bi, WinGDI.DIB_RGB_COLORS);
               	if (ok) {
               		WinGDI.BITMAPINFOHEADER bih = bi.bmiHeader;
               		bih.biHeight = -Math.abs(bih.biHeight);
               		bi.bmiHeader.biCompression = 0;
               		return bufferedImageFromBitmap(blitDC, outputBitmap, bi);
               	} else {
               		return null;
               	}
               }
       	} finally{
       		GDI.DeleteObject(blitDC);
       	}
       } finally {
           GDI.DeleteObject(outputBitmap);
           GDI.DeleteObject(windowDC);
       }
	return null;
}
 
开发者ID:megablue,项目名称:Hearthtracker,代码行数:44,代码来源:HearthRobot.java


示例9: _capture

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
public static BufferedImage _capture(HWND hwnd, Rectangle bounds) {
    HDC windowDC = null;
    
    if(hwnd == null){
    	windowDC = GDI.GetDC(USER.GetDesktopWindow());
    } else {
    	windowDC = GDI.GetDC(hwnd);
    }
    
    HBITMAP outputBitmap =
            GDI.CreateCompatibleBitmap(windowDC,
            bounds.width, bounds.height);
   
    try {
        WinDef.HDC blitDC = GDI.CreateCompatibleDC(windowDC);
        try {
            WinNT.HANDLE oldBitmap =
                    GDI.SelectObject(blitDC, outputBitmap);
            try {
                GDI.BitBlt(blitDC,
                        0, 0, bounds.width, bounds.height,
                        windowDC,
                        bounds.x, bounds.y,
                        GDI32.SRCCOPY);
            } finally {
                GDI.SelectObject(blitDC, oldBitmap);
            }
            WinGDI.BITMAPINFO bi = new WinGDI.BITMAPINFO(40);
            bi.bmiHeader.biSize = 40;
            boolean ok =
                    GDI.GetDIBits(blitDC, outputBitmap, 0, bounds.height,
                    (byte[]) null, bi, WinGDI.DIB_RGB_COLORS);
            if (ok) {
                WinGDI.BITMAPINFOHEADER bih = bi.bmiHeader;
                bih.biHeight = -Math.abs(bih.biHeight);
                bi.bmiHeader.biCompression = 0;
                return bufferedImageFromBitmap(blitDC, outputBitmap, bi);
            } else {
                return null;
            }
        } finally {
            GDI.DeleteObject(blitDC);
        }
    } finally {
        GDI.DeleteObject(outputBitmap);
        GDI.DeleteObject(windowDC);
    }
}
 
开发者ID:megablue,项目名称:Hearthtracker,代码行数:49,代码来源:HearthRobot.java


示例10: BitBlt

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
boolean BitBlt(HDC hdcDest, int nXDest, int nYDest,
int nWidth, int nHeight, HDC hdcSrc,
int nXSrc, int nYSrc, int dwRop);
 
开发者ID:megablue,项目名称:Hearthtracker,代码行数:4,代码来源:HearthRobot.java


示例11: GetDIBits

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
boolean GetDIBits(HDC dc, HBITMAP bmp, int startScan, int scanLines,
byte[] pixels, BITMAPINFO bi, int usage);
 
开发者ID:megablue,项目名称:Hearthtracker,代码行数:3,代码来源:HearthRobot.java


示例12: capture

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
private static BufferedImage capture(HWND hWnd) throws WindowNotFoundException {

    HDC hdcWindow = User32.INSTANCE.GetDC(hWnd);
    HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(hdcWindow);

    RECT bounds = new RECT();
    User32Extra.INSTANCE.GetClientRect(hWnd, bounds);

    int width = bounds.right - bounds.left;
    int height = bounds.bottom - bounds.top;
    
    if(width == 0 || height == 0) throw new peeknick.errormanager.WindowNotFoundException();

    HBITMAP hBitmap = GDI32.INSTANCE.CreateCompatibleBitmap(hdcWindow, width, height);

    HANDLE hOld = GDI32.INSTANCE.SelectObject(hdcMemDC, hBitmap);
    GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, hdcWindow, 0, 0, WinGDIExtra.SRCCOPY);

    GDI32.INSTANCE.SelectObject(hdcMemDC, hOld);
    GDI32.INSTANCE.DeleteDC(hdcMemDC);

    BITMAPINFO bmi = new BITMAPINFO();
    bmi.bmiHeader.biWidth = width;
    bmi.bmiHeader.biHeight = -height;
    bmi.bmiHeader.biPlanes = 1;
    bmi.bmiHeader.biBitCount = 32;
    bmi.bmiHeader.biCompression = WinGDI.BI_RGB;

    Memory buffer = new Memory(width * height * 4);
    GDI32.INSTANCE.GetDIBits(hdcWindow, hBitmap, 0, height, buffer, bmi, WinGDI.DIB_RGB_COLORS);

    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
    image.setRGB(0, 0, width, height, buffer.getIntArray(0, width * height), 0, width);

    GDI32.INSTANCE.DeleteObject(hBitmap);
    User32.INSTANCE.ReleaseDC(hWnd, hdcWindow);

    return image;

  }
 
开发者ID:jardiacaj,项目名称:peeknick,代码行数:41,代码来源:Paint.java


示例13: SetPixel

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The SetPixel function sets the pixel at the specified coordinates to the
 * specified color.
 *
 * @param hDC Handle to the device context.
 * @param x Specifies the x-coordinate, in logical units, of the point to be
 * set.
 * @param y Specifies the y-coordinate, in logical units, of the point to be
 * set.
 * @param crColor Specifies the color to be used to paint the point. To
 * create a COLORREF color value, use the RGB macro.
 * @return If the function succeeds, the return value is the RGB value that
 * the function sets the pixel to. This value may differ from the color
 * specified by crColor; that occurs when an exact match for the specified
 * color cannot be found. If the function fails, the return value is 1. To
 * get extended error information, call GetLastError. This can be the
 * following value.
 */
int SetPixel(HDC hDC, int x, int y, int crColor);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:20,代码来源:Gdi32.java


示例14: CreateCompatibleDC

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The CreateCompatibleDC function creates a memory device context (DC)
 * compatible with the specified device.
 *
 * @param hDC Handle to an existing DC. If this handle is NULL, the function
 * creates a memory DC compatible with the application's current screen.
 * @return If the function succeeds, the return value is the handle to a
 * memory DC. If the function fails, the return value is NULL. To get
 * extended error information, call GetLastError.
 */
HDC CreateCompatibleDC(HDC hDC);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:12,代码来源:Gdi32.java


示例15: DeleteDC

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The DeleteDC function deletes the specified device context (DC).
 *
 * @param hDC Handle to the device context.
 * @return If the function succeeds, the return value is nonzero. If the
 * function fails, the return value is zero. To get extended error
 * information, call GetLastError.
 */
boolean DeleteDC(HDC hDC);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:10,代码来源:Gdi32.java


示例16: CreateDIBitmap

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The CreateDIBitmap function creates a compatible bitmap (DDB) from a DIB
 * and, optionally, sets the bitmap bits.
 *
 * @param hDC Handle to a device context.
 * @param lpbmih Pointer to a bitmap information header structure, which may
 * be one of those shown in the following table.
 * @param fdwInit Specifies how the system initializes the bitmap bits.
 * @param lpbInit Pointer to an array of bytes containing the initial bitmap
 * data.
 * @param lpbmi Pointer to a BITMAPINFO structure that describes the
 * dimensions and color format of the array pointed to by the lpbInit
 * parameter.
 * @param fuUsage Specifies whether the bmiColors member of the BITMAPINFO
 * structure was initialized and, if so, whether bmiColors contains explicit
 * red, green, blue (RGB) values or palette indexes. The fuUsage parameter
 * must be one of the following values.
 * @return If the function succeeds, the return value is a handle to the
 * compatible bitmap. If the function fails, the return value is NULL. To
 * get extended error information, call GetLastError.
 */
HBITMAP CreateDIBitmap(HDC hDC, BITMAPINFOHEADER lpbmih, int fdwInit,
        Pointer lpbInit, BITMAPINFO lpbmi, int fuUsage);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:24,代码来源:Gdi32.java


示例17: CreateDIBSection

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The CreateDIBSection function creates a DIB that applications can write
 * to directly. The function gives you a pointer to the location of the
 * bitmap bit values. You can supply a handle to a file-mapping object that
 * the function will use to create the bitmap, or you can let the system
 * allocate the memory for the bitmap.
 *
 * @param hDC Handle to a device context. If the value of iUsage is
 * DIB_PAL_COLORS, the function uses this device context's logical palette
 * to initialize the DIB colors.
 * @param pbmi Pointer to a BITMAPINFO structure that specifies various
 * attributes of the DIB, including the bitmap dimensions and colors.
 * @param iUsage Specifies the type of data contained in the bmiColors array
 * member of the BITMAPINFO structure pointed to by pbmi (either logical
 * palette indexes or literal RGB values).
 * @param ppvBits Pointer to a variable that receives a pointer to the
 * location of the DIB bit values.
 * @param hSection Handle to a file-mapping object that the function will
 * use to create the DIB. This parameter can be NULL.
 * @param dwOffset Specifies the offset from the beginning of the
 * file-mapping object referenced by hSection where storage for the bitmap
 * bit values is to begin.
 * @return Specifies the offset from the beginning of the file-mapping
 * object referenced by hSection where storage for the bitmap bit values is
 * to begin.
 */
HBITMAP CreateDIBSection(HDC hDC, BITMAPINFO pbmi, int iUsage,
        PointerByReference ppvBits, Pointer hSection, int dwOffset);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:29,代码来源:Gdi32.java


示例18: CreateCompatibleBitmap

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The CreateCompatibleBitmap function creates a bitmap compatible with the
 * device that is associated with the specified device context.
 *
 * @param hDC Handle to a device context.
 * @param width Specifies the bitmap width, in pixels.
 * @param height Specifies the bitmap height, in pixels.
 * @return If the function succeeds, the return value is a handle to the
 * compatible bitmap (DDB). If the function fails, the return value is NULL.
 * To get extended error information, call GetLastError.
 */
HBITMAP CreateCompatibleBitmap(HDC hDC, int width, int height);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:13,代码来源:Gdi32.java


示例19: SelectObject

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The SelectObject function selects an object into the specified device
 * context (DC). The new object replaces the previous object of the same
 * type.
 *
 * @param hDC Handle to the DC.
 * @param hGDIObj Handle to the object to be selected.
 * @return If the selected object is not a region and the function succeeds,
 * the return value is a handle to the object being replaced. If the
 * selected object is a region and the function succeeds, the return value
 * is one of the REGION values.
 */
HANDLE SelectObject(HDC hDC, HANDLE hGDIObj);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:14,代码来源:Gdi32.java


示例20: GetDeviceCaps

import com.sun.jna.platform.win32.WinDef.HDC; //导入依赖的package包/类
/**
 * The GetDeviceCaps function retrieves device-specific information for the
 * specified device.
 *
 * @param hdc A handle to the DC.
 * @param nIndex The item to be returned.
 * @return The return value specifies the value of the desired item. When
 * <i>nIndex</i> is <code>BITSPIXEL</code> and the device has 15bpp or
 * 16bpp, the return value is 16.
 */
int GetDeviceCaps(HDC hdc, int nIndex);
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:12,代码来源:Gdi32.java



注:本文中的com.sun.jna.platform.win32.WinDef.HDC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PsiParserFacade类代码示例发布时间:2022-05-22
下一篇:
Java PermissionGen类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap