MCPcopy Create free account
hub / github.com/VCVRack/Rack / getOutputPos

Method getOutputPos

src/app/CableWidget.cpp:237–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235
236
237math::Vec CableWidget::getOutputPos() {
238 if (outputPort) {
239 return outputPort->getRelativeOffset(outputPort->box.zeroPos().getCenter(), APP->scene->rack);
240 }
241 else if (hoveredOutputPort) {
242 return hoveredOutputPort->getRelativeOffset(hoveredOutputPort->box.zeroPos().getCenter(), APP->scene->rack);
243 }
244 else {
245 return APP->scene->rack->getMousePos();
246 }
247}
248
249
250void CableWidget::mergeJson(json_t* rootJ) {

Callers

nothing calls this directly

Calls 4

getCenterMethod · 0.80
zeroPosMethod · 0.80
getRelativeOffsetMethod · 0.45
getMousePosMethod · 0.45

Tested by

no test coverage detected