op (0x3c, loop) op (0x3d, alt1) op (0x3e, alt2) op (0x3f, alt3) op12 (0x40, ldw_ir) op (0x4c, plot) op (0x4d, swap) op (0x4e, color) op (0x4f, not) op16 (0x50, add_r) op16 (0x60, sub_r) op (0x70, merge) op15h(0x71, and_r) op16 (0x80, mult_r) op (0x90, sbk) op4 (0x91, link) op (0x95, sex) op (0x96, asr) op (0x97, ror) op6 (0x98, jmp_r) op (0x9e, lob) op (0x9f, fmult) op16 (0xa0, ibt_r) op16 (0xb0, from_r) op (0xc0, hib) op15h(0xc1, or_r) op15l(0xd0, inc_r) op (0xdf, getc) op15l(0xe0, dec_r) op (0xef, getb) op16 (0xf0, iwt_r)
QImage* MyWidget::transform_back() const { if(!image_save || frames.size() == 0 || frames_save.size() == 0) return image_save; uint w = image_save->width(), h = image_save->height(); QImage *new_img = new QImage(w,h,QImage::Format_RGB32); QPainter painter; painter.begin(new_img); QBrush brush(QColor(0,0,0)); QPen pen(QColor(0,0,0)); painter.setBrush(brush); painter.setPen(pen); painter.drawRect(QRect(0,0,w-1,h-1)); painter.end(); for(uint i=0;i<frames.size();++i) { auto v2 = &frames, v1 = &frames_save; QPoint p1(v1->at(i).getPoint(0)), p2(v1->at(i).getPoint(1)),p3(v1->at(i).getPoint(2)),p4(v1->at(i).getPoint(3)), op1(v2->at(i).getPoint(0)), op2(v2->at(i).getPoint(1)), op3(v2->at(i).getPoint(2)), op4(v2->at(i).getPoint(3)); std::vector<QPoint> vpi{p1,p2,p3,p4}, vpo{op1,op2,op3,op4}; BilineTransform pt; pt.generateFromPoints(vpo, vpi); pt.transformImage(*image_save, *new_img, v2->at(i)); } return new_img; }