<div><br>void PaintDeviceCairo::BlitToMemory(MemoryImage& image, const ClipRect& rect)<br>{<br> int width = cairo_image_surface_get_stride(m_surface);<br> char* target = (char*)image.buffer + image.pitch * rect._y + rect._x * sizeof(UINT);<br> char* pixels = (char*)cairo_image_surface_get_data(m_surface) + <br> width * rect._y + rect._x * sizeof(UINT);<br> <br> for(int _y = 0; _y < rect._h; _y ++)<br> {<br> memcpy(target, pixels, sizeof(UINT) * rect._w);<br> pixels += width;<br> target += image.pitch;<br> }<br>}<br><br>I'd like a cairo surface part of the draw into the memory, but I found that
always show all black. Why? <br>Note: This memory is D3D SURFACE<br></div><br><br><span title="neteasefooter"/><hr/>
<a href="http://allyes.nie.163.com/main/adfclick?db=afanie&bid=1254,611,23&cid=145,4,1&sid=1351&show=ignore&url=http://tx2.163.com/fab.html">09年新晋3D主流网游《天下贰》,网易六年亿资打造</a>
</span>