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

Method pickColor

Gui/ViewerGL.cpp:3837–3858  ·  view source on GitHub ↗

used for the ctrl-click color picker (not the information bar at the bottom of the viewer)

Source from the content-addressed store, hash-verified

3835
3836// used for the ctrl-click color picker (not the information bar at the bottom of the viewer)
3837bool
3838ViewerGL::pickColor(double x,
3839 double y,
3840 bool pickInput)
3841{
3842 bool isSync = _imp->viewerTab->isViewersSynchroEnabled();
3843
3844 if (isSync) {
3845 bool res = false;
3846 const std::list<ViewerTab*>& allViewers = _imp->viewerTab->getGui()->getViewersList();
3847 for (std::list<ViewerTab*>::const_iterator it = allViewers.begin(); it != allViewers.end(); ++it) {
3848 bool ret = (*it)->getViewer()->pickColorInternal(x, y, pickInput);
3849 if ( (*it)->getViewer() == this ) {
3850 res = ret;
3851 }
3852 }
3853
3854 return res;
3855 } else {
3856 return pickColorInternal(x, y, pickInput);
3857 }
3858}
3859
3860void
3861ViewerGL::updateInfoWidgetColorPicker(const QPointF & imgPos,

Callers

nothing calls this directly

Calls 6

pickColorInternalMethod · 0.80
getGuiMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getViewerMethod · 0.45

Tested by

no test coverage detected