void CtrlVideo::draw( OSGraphics &rImage, int xDest, int yDest ) { const Position *pPos = getPosition(); if( pPos ) { // Draw a black rectangle under the video to avoid transparency rImage.fillRect( pPos->getLeft(), pPos->getTop(), pPos->getWidth(), pPos->getHeight(), 0 ); } }
void CtrlVideo::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h) { const Position *pPos = getPosition(); rect region( pPos->getLeft(), pPos->getTop(), pPos->getWidth(), pPos->getHeight() ); rect clip( xDest, yDest, w, h ); rect inter; if( rect::intersect( region, clip, &inter ) ) { // Draw a black rectangle under the video to avoid transparency rImage.fillRect( inter.x, inter.y, inter.width, inter.height, 0 ); } if( m_pVoutWindow ) { m_pVoutWindow->show(); } }