| 1511 | } |
| 1512 | |
| 1513 | void |
| 1514 | DopeSheetViewPrivate::drawProjectBounds() const |
| 1515 | { |
| 1516 | running_in_main_thread_and_context(q_ptr); |
| 1517 | |
| 1518 | double bottom = zoomContext.toZoomCoordinates(0, q_ptr->height() - 1).y(); |
| 1519 | double top = zoomContext.toZoomCoordinates(q_ptr->width() - 1, 0).y(); |
| 1520 | double projectStart, projectEnd; |
| 1521 | if (!gui) { |
| 1522 | return; |
| 1523 | } |
| 1524 | GuiAppInstancePtr app = gui->getApp(); |
| 1525 | if (!app) { |
| 1526 | return; |
| 1527 | } |
| 1528 | app->getFrameRange(&projectStart, &projectEnd); |
| 1529 | |
| 1530 | SettingsPtr settings = appPTR->getCurrentSettings(); |
| 1531 | double colorR, colorG, colorB; |
| 1532 | settings->getTimelineBoundsColor(&colorR, &colorG, &colorB); |
| 1533 | |
| 1534 | // Perform drawing |
| 1535 | { |
| 1536 | GLProtectAttrib a(GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT); |
| 1537 | |
| 1538 | glColor4f(colorR, colorG, colorB, 1.f); |
| 1539 | |
| 1540 | // Draw start bound |
| 1541 | glLineWidth(1. * _screenPixelRatio); |
| 1542 | glBegin(GL_LINES); |
| 1543 | glVertex2f(projectStart, top); |
| 1544 | glVertex2f(projectStart, bottom); |
| 1545 | glEnd(); |
| 1546 | |
| 1547 | // Draw end bound |
| 1548 | glLineWidth(1. * _screenPixelRatio); |
| 1549 | glBegin(GL_LINES); |
| 1550 | glVertex2f(projectEnd, top); |
| 1551 | glVertex2f(projectEnd, bottom); |
| 1552 | glEnd(); |
| 1553 | } |
| 1554 | } |
| 1555 | |
| 1556 | /** |
| 1557 | * @brief DopeSheetViewPrivate::drawIndicator |
no test coverage detected