示例#1
0
void AlphaMask::draw(){
    ofApp *app = ((ofApp*)ofGetAppPtr());
    
    ofPushMatrix();
    ofTranslate(960, 0);
    // Circle Mask (Full HD or 1980 x 630)
    
    if (app->screenMode == 0 || app->screenMode == 1) {
        maskCircle();
    }
    if (app->screenMode == 2) {
        maskRect();
    }
    
    // Rect mask in 1980 x 630
    // Top & Bottom mask
    if (app->screenMode == 1 || app->screenMode == 2) {
        ofSetColor(0);
        ofSetRectMode(OF_RECTMODE_CORNER);
        ofPushMatrix();
        ofRect(0, 0, 1920, 224);
        ofTranslate(0, 630 + 224);
        ofRect(0, 0, 1920, 300);
        ofPopMatrix();
    }
    ofPopMatrix();
}
示例#2
0
void QxrdImagePlot::setProcessor(QxrdDataProcessorWPtr proc)
{
  m_DataProcessor = proc;

  QxrdDataProcessorPtr dp(m_DataProcessor);

  if (dp) {
    QxrdCenterFinderPtr cf(dp->centerFinder());

    if (cf) {
      connect(m_CenterFinderPicker, SIGNAL(selected(QPointF)),
              cf.data(), SLOT(onCenterChanged(QPointF)));

      connect(m_Circles, SIGNAL(selected(QRectF)),
              dp.data(), SLOT(maskCircle(QRectF)));

      connect(m_Polygons, SIGNAL(selected(QVector<QPointF>)),
              dp.data(), SLOT(maskPolygon(QVector<QPointF>)));

      connect(m_Measurer, SIGNAL(selected(QVector<QPointF>)),
              dp.data(), SLOT(measurePolygon(QVector<QPointF>)));

      //  connect(m_Slicer, SIGNAL(selected(QVector<QPointF>)),
    //          m_DataProcessor, SLOT(slicePolygon(QVector<QPointF>)));

      connect(m_PowderPointPicker, SIGNAL(selected(QPointF)),
              cf.data(), SLOT(onPointSelected(QPointF)));

      onCenterChanged(QPointF(cf->get_CenterX(), cf->get_CenterY()));

      connect(cf->prop_MarkedPoints(), SIGNAL(valueChanged(QxrdPowderPointVector,int)),
              this, SLOT(onMarkedPointsChanged()));

      onMarkedPointsChanged();
    }
  }

  connect(m_Slicer, SIGNAL(selected(QVector<QPointF>)),
          this, SIGNAL(slicePolygon(QVector<QPointF>)));

  connect(m_HistogramSelector, SIGNAL(selected(QRectF)),
          this, SIGNAL(selectHistogram(QRectF)));
}