Picture operator|(const Picture& p, const Picture& q) { Picture r; r.init(Picture::max(p.height,q.height),p.width + q.width); r.clear(p.height,0,r.height,q.width); r.clear(q.height,p.width,r.height,r.width); r.copyblock(0,0,p); r.copyblock(0,p.width,q); return r; }
Picture operator&(const Picture& p, const Picture& q) { Picture r; r.init(p.height + q.height, Picture::max(p.width ,q.width)); r.clear(0,p.width,p.height,r.width); r.clear(p.height,q.width,r.height,r.width); r.copyblock(0,0,p); r.copyblock(p.height,0,q); return r; }