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

Method addFrame

src/app/SvgButton.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31
32void SvgButton::addFrame(std::shared_ptr<window::Svg> svg) {
33 frames.push_back(svg);
34 // If this is our first frame, automatically set SVG and size
35 if (!sw->svg) {
36 sw->setSvg(svg);
37 box.size = sw->box.size;
38 fb->box.size = sw->box.size;
39 // Move shadow downward by 10%
40 shadow->box.size = sw->box.size;
41 shadow->box.pos = math::Vec(0, sw->box.size.y * 0.10);
42 fb->setDirty();
43 }
44}
45
46
47void SvgButton::onDragStart(const DragStartEvent& e) {

Callers

nothing calls this directly

Calls 3

VecClass · 0.85
setDirtyMethod · 0.80
setSvgMethod · 0.45

Tested by

no test coverage detected