[cairo] write big pdf to stream ?

brah abk brah.abk at gmail.com
Thu Apr 14 03:29:07 PDT 2011


hi,
i am using cairomm to render a pdf/ps files with great data, i use this
function
    surface =
Cairo::PdfSurface::create(writer,&vectdata,m_rect.Width(),m_rect.Height());

static cairo_status_t
writer (void *closure, const unsigned char *wdata, unsigned int len)
{

CByteArray* buffer = reinterpret_cast<CByteArray*>(closure);

const int currentLength = buffer->GetSize();
const int newLength = currentLength + len;
buffer->SetSize(newLength,10*len);


BYTE*  buff= buffer->GetData() + currentLength;
::CopyMemory(buff,wdata,len);
}

how to speed the process, do i need to lock process here, or how i can put a
fire&forget algo herre
10x
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20110414/0da03088/attachment.html>


More information about the cairo mailing list