RawImage* ScaleFilter::ProcessInput(CommandLineArgModel* arg, RawImage* image) { ScaleFilterModel* model = (ScaleFilterModel*)arg->ParsedModel; double value = model->Scale; if (value == 0) return new RawImage(0, 0); if (value < 1) return scaleDown(value, image); if (value > 1) return scaleUp(value, image); return image; }
/** * FUNCTION NAME: checkFalsePositiveRate * * DESCRIPTION: This function checks the current false positive rate of the FBF * and decides whether to trigger dynamic resizing */ void FBF::checkFalsePositiveRate() { trace.funcEntry("FBF::checkFalsePositiveRate"); double currentFPR = checkEffectiveFPR(); if ( currentFPR > thresholdFraction * maxTolerableFPR ) { scaleUp(); } else if ( currentFPR <= safeThresholdFraction * maxTolerableFPR ) { scaleDown(); } trace.funcExit("FBF::checkFalsePositiveRate"); }
void World::keyDown(int kid) { #ifdef WIN32 switch(kid) { case 4: // for PC SDL weel up/down scaleUp(0.2f); break; case 5: scaleUp(-0.2f); break; case 27: pause(); break; default: break; } #elif defined(ANDROID) if(kid == BACK_KEY_ID) pause(); #endif }
void HelpWebView::wheelEvent(QWheelEvent *e) { if (e->modifiers()& Qt::ControlModifier) { e->accept(); e->delta() > 0 ? scaleUp() : scaleDown(); } else { QWebView::wheelEvent(e); } }
void ImageViewer::createActions() { this->saveAct = new QAction(tr("&Save"), this); saveAct->setShortcut(tr("Ctrl+S")); connect(saveAct, SIGNAL(triggered()), this, SLOT(saveImage())); exitAct = new QAction(tr("Sa&lir"), this); exitAct->setShortcut(tr("Ctrl+Q")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); zoomInAct = new QAction(tr("Zoom &In (25%)"), this); zoomInAct->setShortcut(tr("Ctrl++")); connect(zoomInAct, SIGNAL(triggered()), this, SLOT(scaleUp())); zoomOutAct = new QAction(tr("Zoom &Out (25%)"), this); zoomOutAct->setShortcut(tr("Ctrl+-")); connect(zoomOutAct, SIGNAL(triggered()), this, SLOT(scaleDown())); }
b2Vec2 World::scaleUp(const b2Vec2 & v) { b2Vec2 t = v; scaleUp(t.x, t.y); return t; }
void CSisr::process(const cv::Mat& src, cv::Mat& dst, cv::Mat& diff) { scaleUp(src, dst, diff); }