#2
xyzdwf2021-09-14 19:19
|
下面是我绘制的代码,是网络上找的双缓冲绘制,自己的图形绘制是在gui_context_draw中进行,论坛里的高手帮我看看有没有问题
程序代码:
void gui_gdiplus_paint(gui_gdiplus_context_p context, HWND hwnd, HDC hdc)
{
RECT rect;
GpBitmap* bitmap;
GpGraphics* hdcgraphic;
GetClientRect (hwnd, &rect);
GdipCreateFromHDC(context->hdc, &hdcgraphic);
GdipCreateBitmapFromGraphics(rect.right, rect.bottom, hdcgraphic, &bitmap);
GdipGetImageGraphicsContext(bitmap, &context->graphics);
// GdipSetTextRenderingHint(context->graphics, 3);
// GdipSetSmoothingMode(context->graphics, SmoothingModeAntiAlias);
gui_context_draw(context->ctx);
GdipDrawImageI(hdcgraphic, bitmap, 0, 0);
GdipDisposeImage(bitmap);
GdipDeleteGraphics(hdcgraphic);
GdipDeleteGraphics(context->graphics);
}
以下是打的32位exe,不知道能不能在64为系统下运行
只有本站会员才能查看附件,请 登录