void pasteGeneral(void){ if (MW_has_mouse_pointer()) pasteMixerObjects(-10000,-10000); else if (SEQUENCER_has_mouse_pointer()) pasteSeqblocks(-1,-1); else pasteBlock(-1); }
void quilt(Image *target, Image *target_crsp, int rows, int cols, Image *source, Image *source_crsp) { for (int n = 0; n < numIterations; n++) { //alpha = 0.8 * (n / float(numIterations)) + .1; alpha = .1; const int numTrials = sqrt((source->width - blockWidth) * (source->height - blockHeight)); std::cout << "quilting with " << numTrials << " trials" << std::endl; // %%% for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { int x, y; findOverlap(&x, &y, target, target_crsp, i, j, source, source_crsp, numTrials); int vertCut[blockHeight]; int horizCut[blockWidth]; findErrorSurface(vertCut, horizCut, target, i, j, source, x, y); pasteBlock(target, i, j, vertCut, horizCut, source, x, y); } } blockHeight /= 3; //hmmmmm } }