| 1474 | } |
| 1475 | |
| 1476 | void |
| 1477 | DopeSheetViewPrivate::drawGroupOverlay(const DSNodePtr &dsNode, |
| 1478 | const DSNodePtr &group) const |
| 1479 | { |
| 1480 | // Get the overlay color |
| 1481 | double r, g, b; |
| 1482 | |
| 1483 | dsNode->getNodeGui()->getColor(&r, &g, &b); |
| 1484 | |
| 1485 | // Compute the area to fill |
| 1486 | int height = hierarchyView->getHeightForItemAndChildren( dsNode->getTreeItem() ); |
| 1487 | QRectF nameItemRect = hierarchyView->visualItemRect( dsNode->getTreeItem() ); |
| 1488 | |
| 1489 | assert( nodeRanges.find( group.get() ) != nodeRanges.end() ); |
| 1490 | FrameRange groupRange = nodeRanges.find( group.get() )->second; // map::at() is C++11 |
| 1491 | RectD overlayRect; |
| 1492 | overlayRect.x1 = groupRange.first; |
| 1493 | overlayRect.x2 = groupRange.second; |
| 1494 | |
| 1495 | overlayRect.y1 = zoomContext.toZoomCoordinates(0, nameItemRect.top() + height).y(); |
| 1496 | overlayRect.y2 = zoomContext.toZoomCoordinates( 0, nameItemRect.top() ).y(); |
| 1497 | |
| 1498 | // Perform drawing |
| 1499 | { |
| 1500 | GLProtectAttrib a(GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT); |
| 1501 | |
| 1502 | glColor4f(r, g, b, 0.30f); |
| 1503 | |
| 1504 | glBegin(GL_QUADS); |
| 1505 | glVertex2f( overlayRect.left(), overlayRect.top() ); |
| 1506 | glVertex2f( overlayRect.left(), overlayRect.bottom() ); |
| 1507 | glVertex2f( overlayRect.right(), overlayRect.bottom() ); |
| 1508 | glVertex2f( overlayRect.right(), overlayRect.top() ); |
| 1509 | glEnd(); |
| 1510 | } |
| 1511 | } |
| 1512 | |
| 1513 | void |
| 1514 | DopeSheetViewPrivate::drawProjectBounds() const |
nothing calls this directly
no test coverage detected