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

Method addFrame

src/app/SvgSwitch.cpp:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25void SvgSwitch::addFrame(std::shared_ptr<window::Svg> svg) {
26 frames.push_back(svg);
27 // If this is our first frame, automatically set SVG and size
28 if (!sw->svg) {
29 sw->setSvg(svg);
30 box.size = sw->box.size;
31 fb->box.size = sw->box.size;
32 // Move shadow downward by 10%
33 shadow->box.size = sw->box.size;
34 shadow->box.pos = math::Vec(0, sw->box.size.y * 0.10);
35 }
36}
37
38
39void SvgSwitch::onDragStart(const DragStartEvent& e) {

Callers

nothing calls this directly

Calls 2

VecClass · 0.85
setSvgMethod · 0.45

Tested by

no test coverage detected