예제 #1
0
파일: main.cpp 프로젝트: flair2005/TDSmoke
void display()
{
    glClear(GL_COLOR_BUFFER_BIT);
    
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
    
    g_simulation_ensemble->display();
    
#ifdef PNGOUT
    drawDescription();
#else
    drawFPS();
#endif
    
    glutSwapBuffers();
    
    assert( renderingutils::checkGLErrors() );
}
예제 #2
0
bool ItemView::on_draw(const Cairo::RefPtr<Cairo::Context>& cr)
{
    Gtk::Allocation allocation = get_allocation();

    int width = allocation.get_width();
    int height = allocation.get_height();

    //draw bottom shadow
    cr->set_source_rgb(0.9, 0.9, 0.9);
    cr->paint();

    //make room for content
    height -= 1;

    //update clear notification button layout
    updateClearNotificationButtonLayout(width, height);

    fontTime.set_size(FONT_SIZE * PANGO_SCALE);
    fontTitle.set_size(FONT_SIZE * PANGO_SCALE);
    fontDescription.set_size(FONT_SIZE_SMALL * PANGO_SCALE);

    cr->set_antialias(Cairo::ANTIALIAS_NONE);

    drawBackground(cr, width, height);

    cr->set_antialias(Cairo::ANTIALIAS_DEFAULT);

    //draw objects
    drawTime(cr, width, height);
    drawTitle(cr, width, height);
    drawDescription(cr, width, height);
    drawReminderIcon(cr, width, height);

    //update buttons layout according to selection state and description position
    updateButtonsLayout(width, height, rectDescription.get_y(), rectDescription.get_height());

    //draw buttons
    drawButtons(cr, width, height);

    return true;
}