MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / drawGroupOverlay

Method drawGroupOverlay

Gui/DopeSheetView.cpp:1476–1511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474}
1475
1476void
1477DopeSheetViewPrivate::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
1513void
1514DopeSheetViewPrivate::drawProjectBounds() const

Callers

nothing calls this directly

Calls 14

getTreeItemMethod · 0.80
visualItemRectMethod · 0.80
getColorMethod · 0.45
getNodeGuiMethod · 0.45
findMethod · 0.45
getMethod · 0.45
endMethod · 0.45
yMethod · 0.45
toZoomCoordinatesMethod · 0.45
topMethod · 0.45
leftMethod · 0.45

Tested by

no test coverage detected