Ejemplo n.º 1
0
//--------------------------------------------------------------
void ofApp::draw(){
    ofBackground(0, 0, 0);
//    glPointSize(2);
    ofSetColor(255, 255, 255);

    
    
    // If blur is on, start the blur
    if (blurToggle == true) {
        blur.begin();
        ofBackground(0, 0, 0);
//        ofEnableBlendMode(OF_BLENDMODE_ALPHA);
    }

    drawHelper();
    
    if (blurToggle == true) {
        blur.end();
        blur.draw();
    }
    
    // If blur is on, draw it a second time
    if (blurToggle == true) {
        drawHelper();
    }

    
    // Save frame
    if (saveScreen) {
        ofSaveScreen(ofToString(ofGetFrameNum())+".png");
        saveScreen = false;
    }
    
    // Save frames for video
    if (saveVideoScreens) {
        
        if (videoScreensCounter < videoScreens) {
            ofSaveScreen(ofToString(ofGetFrameNum())+".jpg");
            videoScreensCounter += 1;
            
        } else {
            videoScreensCounter = 0;
            saveVideoScreens = false;
            
        }
        
    }
    
    // Show the GUI if we want it
    if (showGui) {
        gui.draw();
    }
}
Ejemplo n.º 2
0
		GBL::CmRetCode_t Utils::drawResults(InputMethod::InputMethodInterface& inputMethod, Draw::DrawInterface& drawer, const ImageProc::ImageProc& imProc, std::vector<GBL::DescriptorContainer_t> descriptors, std::vector<GBL::MatchesContainer_t> allMatches, uint32_t nbFrames, const GBL::Image_t& image2) {
			LOG_ENTER("void");
			GBL::CmRetCode_t result = GBL::RESULT_FAILURE;
			OutputMethod::OutputImageSequence outputMethod("correspondenceframe");
			LOG_INFO("Drawing output images");
			if(drawHelper(outputMethod, inputMethod, drawer, imProc, descriptors, allMatches, nbFrames, nullptr, nullptr) != GBL::RESULT_SUCCESS) {
				LOG_ERROR("Could not draw result frames");
			}
			OutputMethod::OutputImageSequence procOutputMethod("procframe");
			DrawResultProc_f fastSubtract_f = fastSubtractHandler;
			if(drawHelper(procOutputMethod, inputMethod, drawer, imProc, descriptors, allMatches, nbFrames, fastSubtract_f, &image2) != GBL::RESULT_SUCCESS) {
				LOG_ERROR("Could not draw processing frames");
			}
			LOG_EXIT("result = %d", result);
			return result;
		}
Ejemplo n.º 3
0
	//-----------------------------------------------------------------------------
	// Purpose: 
	// Output : Returns true on success, false on failure.
	//-----------------------------------------------------------------------------
	bool PaintBackground( void )
	{
		CChoreoWidgetDrawHelper drawHelper( this );
		RECT rc;
		drawHelper.GetClientRect( rc );
		drawHelper.DrawFilledRect( GetSysColor( COLOR_APPWORKSPACE ), rc );
		return false;
	}
Ejemplo n.º 4
0
//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
bool MDLViewer::PaintBackground( void )
{
	CChoreoWidgetDrawHelper drawHelper( this );

	RECT rc;
	drawHelper.GetClientRect( rc );

	drawHelper.DrawFilledRect( COLOR_CHOREO_BACKGROUND, rc );
	return false;
}
Ejemplo n.º 5
0
void HermiteShape::Draw(CDC *pDC)
{
	if(IsDone())
	{
		drawHelper(pDC, counter);
		
		HPEN pen = CreatePen(2, 2, 0xff0000);
		HPEN old = (HPEN)SelectObject (pDC->m_hDC ,pen);

		pDC -> MoveTo(Hermit(0));
		for(float t = 0; t <= 1; t += 0.001f)
		{
			pDC -> LineTo(Hermit(t));
		}
		SelectObject (pDC->m_hDC ,old);
		DeleteObject(pen);
	}
	else
	{
		drawHelper(pDC, counter);
	}
}