MCPcopy Create free account
hub / github.com/amsynth/amsynth / paint

Method paint

src/core/gui/Controls.cpp:58–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void Control::paint(juce::Graphics &g) {
59 int x = 0, y = 0;
60 if (image_.getHeight() == height_) {
61 x = frame_ * width_;
62 } else {
63 y = frame_ * height_;
64 }
65 g.drawImage(image_, 0, 0, width_, height_, x, y, width_, height_, false);
66}
67
68void Control::parameterDidChange(const Parameter &) {
69 int frame = int(float(frames_ - 1) * parameter.getNormalisedValue());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected