Oscilloscope: Draw line through values only?
-
Can an oscilloscope be styled to only draw a single line through the positions of values instead of coloring the space between values and zero?
I guess not by editing JSON properties. So I searched for occurences of the string oscillo in the rep of the develop source code. It revealed:
void OscillatorDisplayProvider::osc_display::paint(Graphics& g) { auto laf = getSpecialLookAndFeel<RingBufferComponentBase::LookAndFeelMethods>(); auto b = getLocalBounds().reduced(10, 3).withSizeKeepingCentre(180, getHeight() - 6).toFloat(); laf->drawOscilloscopeBackground(g, *this, b.expanded(3.0f)); Path grid; grid.addRectangle(b); laf->drawAnalyserGrid(g, *this, grid); if (!waveform.getBounds().isEmpty()) laf->drawOscilloscopePath(g, *this, waveform); }
Can I replace *this in laf->drawOscilloscopeBackground() to something like #00000000 to remove the fill?
-
@Frankbeat You can access oscilloscope (and other friends) as displayBuffer so you can get the corresponding path and do whatever you need with it