<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1561" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi all, </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I'm newbie, I try to show bitmap(1bpp~24bpp) using
cairo_image_surface_create_for_data(), but find out the speed is
unbearable.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Code goes like this:<BR>...<BR>cairo_t *pMemCR =
pGraphics->GetCR();<BR>DFE_ASSERT(pMemCR !=
DFE_Null);<BR>cairo_move_to(pMemCR, dDstX, dDstY);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>cairo_surface_t *image =
cairo_image_surface_create_for_data((unsigned char*)pData, CAIRO_FORMAT_A1,
pInfo->bmiHeader.biWidth, pInfo->bmiHeader.biHeight,
0);<BR>cairo_set_source_surface(pMemCR, image, dDstX,
dDstY);<BR>cairo_paint(pMemCR);<BR>cairo_surface_destroy(image);<BR>...</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Is this the correct method to show bitmap? Or there is better
way to do it(manipulate pData directly...)?<BR>Hope someone would shed light on
this. Thanks!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>stephen</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>