| 639 | } |
| 640 | |
| 641 | void |
| 642 | TrackerNodeInteract::drawSelectedMarkerKeyframes(const std::pair<double, double>& pixelScale, |
| 643 | int currentTime) |
| 644 | { |
| 645 | TrackMarkerPtr marker = selectedMarker.lock(); |
| 646 | |
| 647 | assert(marker); |
| 648 | if (!marker) { |
| 649 | return; |
| 650 | } |
| 651 | if ( !marker->isEnabled(currentTime) ) { |
| 652 | return; |
| 653 | } |
| 654 | |
| 655 | OverlaySupport* overlay = _p->publicInterface->getCurrentViewportForOverlays(); |
| 656 | assert(overlay); |
| 657 | |
| 658 | double overlayColor[3]; |
| 659 | if ( !_p->publicInterface->getNode()->getOverlayColor(&overlayColor[0], &overlayColor[1], &overlayColor[2]) ) { |
| 660 | overlayColor[0] = overlayColor[1] = overlayColor[2] = 0.8; |
| 661 | } |
| 662 | double screenPixelRatio = overlay->getScreenPixelRatio(); |
| 663 | |
| 664 | KnobDoublePtr centerKnob = marker->getCenterKnob(); |
| 665 | KnobDoublePtr offsetKnob = marker->getOffsetKnob(); |
| 666 | KnobDoublePtr errorKnob = marker->getErrorKnob(); |
| 667 | KnobDoublePtr ptnTopLeft = marker->getPatternTopLeftKnob(); |
| 668 | KnobDoublePtr ptnTopRight = marker->getPatternTopRightKnob(); |
| 669 | KnobDoublePtr ptnBtmRight = marker->getPatternBtmRightKnob(); |
| 670 | KnobDoublePtr ptnBtmLeft = marker->getPatternBtmLeftKnob(); |
| 671 | KnobDoublePtr searchWndBtmLeft = marker->getSearchWindowBottomLeftKnob(); |
| 672 | KnobDoublePtr searchWndTopRight = marker->getSearchWindowTopRightKnob(); |
| 673 | int fontHeight = overlay->getWidgetFontHeight(); |
| 674 | |
| 675 | int selectedMarkerWidth = magWindowPxSizeKnob.lock()->getValue(); |
| 676 | double xOffsetPixels = selectedMarkerWidth; |
| 677 | QPointF viewerTopLeftCanonical = overlay->toCanonicalCoordinates( QPointF(0, 0.) ); |
| 678 | |
| 679 | |
| 680 | for (TrackKeysMap::iterator it = trackTextures.begin(); it != trackTextures.end(); ++it) { |
| 681 | if (it->first.lock() == marker) { |
| 682 | if ( it->second.empty() ) { |
| 683 | break; |
| 684 | } |
| 685 | ///Render at most MAX_TRACK_KEYS_TO_DISPLAY keyframes |
| 686 | KeyFrameTexIDs keysToRender = getKeysToRenderForMarker(currentTime, it->second); |
| 687 | |
| 688 | for (KeyFrameTexIDs::const_iterator it2 = keysToRender.begin(); it2 != keysToRender.end(); ++it2) { |
| 689 | double time = (double)it2->first; |
| 690 | Point offset, center, topLeft, topRight, btmRight, btmLeft; |
| 691 | |
| 692 | center.x = centerKnob->getValueAtTime(time, 0); |
| 693 | center.y = centerKnob->getValueAtTime(time, 1); |
| 694 | offset.x = offsetKnob->getValueAtTime(time, 0); |
| 695 | offset.y = offsetKnob->getValueAtTime(time, 1); |
| 696 | |
| 697 | topLeft.x = ptnTopLeft->getValueAtTime(time, 0) + offset.x + center.x; |
| 698 | topLeft.y = ptnTopLeft->getValueAtTime(time, 1) + offset.y + center.y; |
nothing calls this directly
no test coverage detected