MCPcopy Create free account
hub / github.com/DISTRHO/DPF / getKeyBounds

Method getKeyBounds

examples/SendNote/SendNoteExampleUI.cpp:140–149  ·  view source on GitHub ↗

Get the bounds of a particular key of the virtual MIDI keyboard. */

Source from the content-addressed store, hash-verified

138 Get the bounds of a particular key of the virtual MIDI keyboard.
139 */
140 Rectangle<int> getKeyBounds(unsigned index) const
141 {
142 Rectangle<int> bounds;
143 int padding = 8;
144 bounds.setX(64 * index + padding);
145 bounds.setY(padding);
146 bounds.setWidth(64 - padding);
147 bounds.setHeight(64 - padding);
148 return bounds;
149 }
150
151 /**
152 The pressed state of one octave of a virtual MIDI keyboard.

Callers

nothing calls this directly

Calls 4

setXMethod · 0.80
setYMethod · 0.80
setWidthMethod · 0.45
setHeightMethod · 0.45

Tested by

no test coverage detected