void draw_objects(HWND hWnd) { PAINTSTRUCT ps; HDC hdc; WORD t; int a=-1; SCROLLINFO si; ZeroMemory(&si, sizeof(si)); si.cbSize = sizeof(si); si.fMask = SIF_POS; GetScrollInfo(ghWndDesign, SB_HORZ, &si); SX=-si.nPos; GetScrollInfo(ghWndDesign, SB_VERT, &si); SY=-si.nPos; hdc = BeginPaint (hWnd, &ps); for (t=0;t<GLOBAL.objects;t++) { draw_object(hdc,t); // draw_connections(hdc,t); draw_captions(hdc,t); if (objects[t]==actobject) a=t; } // for (t=0;t<GLOBAL.objects;t++) draw_captions(hdc,t); if (a!=-1) { draw_object(hdc,a); draw_connections(hdc,a); draw_captions(hdc,a); } for (t=0;t<GLOBAL.objects;t++) draw_connections(hdc,t); EndPaint( hWnd, &ps ); }
void mepp_component_CGAL_Example_plugin::post_draw_all_scene() { // active viewer //if (mw->activeMdiChild() != 0) { Viewer* viewer = (Viewer *)mw->activeMdiChild(); PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron(); if (doesExistComponentForViewer<CGAL_Example_ComponentPtr, CGAL_Example_Component>(viewer, polyhedron_ptr)) // important !!! { CGAL_Example_ComponentPtr component_ptr = findOrCreateComponentForViewer<CGAL_Example_ComponentPtr, CGAL_Example_Component>(viewer, polyhedron_ptr); if (component_ptr->get_init() == 3) { int nbMesh = qMin(viewer->getScenePtr()->get_nb_polyhedrons(), viewer->get_nb_frames()); if (nbMesh == 2) { glPushMatrix(); glDisable(GL_LIGHTING); // here your code draw_connections(viewer, 0, 1); // link between first and second mesh (first and second frame) glEnable(GL_LIGHTING); glPopMatrix(); } } } } }
void Chain::draw ( void ) { Fl_Group::draw(); /* if ( 0 == strcmp( "Chain", tabs->value()->label() ) ) */ if ( chain_tab->visible() ) for ( int i = 0; i < modules(); ++i ) draw_connections( module( i ) ); }
void Renderer::draw() { ci::gl::setMatricesWindow(AdjApp::instance().getWindowSize()); ci::gl::clear(background_color_); ci::gl::pushMatrices(); Camera::instance().transform_draw(); draw_connections(); draw_nodes(); ci::gl::popMatrices(); }