HISE Logo Forum
    • Categories
    • Register
    • Login

    Oscilloscope: Draw line through values only?

    Scheduled Pinned Locked Moved General Questions
    2 Posts 2 Posters 260 Views
    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

        Can't help pressing F5 in the forum...

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

        55

        Online

        1.7k

        Users

        11.7k

        Topics

        101.9k

        Posts