MCPcopy Create free account
hub / github.com/apohl79/audiogridder / getScreenCaptureRect

Method getScreenCaptureRect

Server/Source/ProcessorWindow.cpp:83–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83juce::Rectangle<int> ProcessorWindow::getScreenCaptureRect() {
84 traceScope();
85 if (nullptr != m_processor) {
86 bool fs = m_processor->isFullscreen();
87 auto rect = fs ? m_totalRect : m_processor->getScreenBounds();
88 if (!fs && m_processor->getAdditionalScreenCapturingSpace() > 0) {
89 rect.setSize(rect.getWidth() + m_processor->getAdditionalScreenCapturingSpace(),
90 rect.getHeight() + m_processor->getAdditionalScreenCapturingSpace());
91 if (rect.getRight() > m_totalRect.getRight()) {
92 rect.setRight(m_totalRect.getRight());
93 }
94 if (rect.getBottom() > m_totalRect.getBottom()) {
95 rect.setBottom(m_totalRect.getBottom());
96 }
97 }
98 return rect;
99 } else {
100 logln("getScreenCaptureRect failed: no processor");
101 }
102 traceln("m_editor=" << (uint64)m_editor << " m_processor=" << String::toHexString((uint64)m_processor.get()));
103 return m_screenCaptureRect;
104}
105
106bool ProcessorWindow::isFullyVisible() const {
107 return m_screenCaptureRect.getX() >= 0 && m_screenCaptureRect.getY() >= 0 &&

Callers

nothing calls this directly

Calls 5

isFullscreenMethod · 0.80
setSizeMethod · 0.80
getScreenBoundsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected