Logo Search packages:      
Sourcecode: djvulibre version File versions

void GPixmap::borrow_data ( GPixel data,
int  w,
int  h 
) [inline]

Initializes this GPixmap by borrowing a memory segment. The GPixmap then directly addresses the memory buffer data# provided by the user. This buffer must be large enough to hold w*h# GPixels. The GPixmap object does not ``own'' the buffer: you must explicitly de-allocate the buffer using operator delete []#. This de-allocation should take place after the destruction or the re-initialization of the GPixmap object.

Definition at line 504 of file GPixmap.h.

References donate_data().

{
  donate_data(&data,w,h);
  pixels_data=0;
}


Generated by  Doxygen 1.6.0   Back to index