// ----------------------------------------------------------------------------- // CGuiEngineAppView::Draw() // Draws the display // ----------------------------------------------------------------------------- // void CGuiEngineAppView::Draw( const TRect& /*aRect*/ ) const { CWindowGc& graphicsContext = SystemGc(); // Clear the application view graphicsContext.Clear(); // Gets the control's extent TRect rect( Rect() ); graphicsContext.DrawRect( rect ); // Draw the 'cursor' crosshair, size 10 pixels by 10 pixels graphicsContext.SetPenSize( TSize( 1,1 ) ); //graphicsContext.SetPenColor( RgbBlack ); graphicsContext.DrawLine ( TPoint( iPosition.iX - 10, iPosition.iY ), TPoint( iPosition.iX + 10, iPosition.iY ) ); graphicsContext.DrawLine ( TPoint( iPosition.iX, iPosition.iY - 10 ), TPoint( iPosition.iX, iPosition.iY + 10 ) ); // Draw all the current shapes TShape* shape = iDocument->Model()->GetNextShape(); while ( shape ) { shape->Draw( graphicsContext ); shape = iDocument->Model()->GetNextShape(); } }
void QComponent::draw() { TShape shp (r, shpUpBox, 3, EGA_DARKGRAY); shp.Draw (); int tx, ty; tx = r.a.x+(r.b.x-r.a.x)/2; ty = r.a.y+(r.b.y-r.a.y)/2; gui_outtextxy( tx, ty, name, 1, EGA_BLUE, -1); QPin *p; for (p=pins; p; p=p->next) p->draw(); }