Forum
    • Categories
    • Register
    • Login

    Oscilloscope: Draw line through values only?

    General Questions
    2
    2
    39
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FrankbeatF
      Frankbeat
      last edited by

      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?

      Using HISE from the develop branch (Feb '23)

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @Frankbeat
        last edited by

        @Frankbeat You can access oscilloscope (and other friends) as displayBuffer so you can get the corresponding path and do whatever you need with it

        I can't help pressing F5 in the forum...

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        18

        Online

        1.2k

        Users

        7.9k

        Topics

        71.2k

        Posts