bool pickWrapped(KisPaintDeviceSP dev, QPoint pos, KoColor *color, KisImageSP image) { if (!image->tryBarrierLock()) return false; if (image->wrapAroundModePermitted()) { pos = KisWrappedRect::ptToWrappedPt(pos, image->bounds()); } bool result = pick(dev, pos, color); image->unlock(); return result; }