A size-adjusted shallow copy of the input Pixmap overwritten with the image data of the SubPixmap.
Always use the returned Pixmap structure.
// Same buffer, but new structure: auto pixmap2 = source.copyTo(pixmap); // Alternatively, replace the old structure: pixmap = source.copyTo(pixmap);
Copies the pixel data to the target Pixmap.