Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339665

Summary: Resize of Oscilloscope causes the drawing to restart
Product: z_Archived Reporter: Michael Fröschen <michael.froeschen>
Component: NebulaAssignee: Wim Jongman <wim.jongman>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Fröschen CLA 2011-03-11 05:47:40 EST
Build Identifier: 3.6.1

If you resize the Oscilloscope, the drawing disappears. After that, it continues to draw, but the whole drawing made so far is away.
I would rather expect to see the drawing as it was before.

Reproducible: Always

Steps to Reproduce:
1. Create an Application using the Oscilloscope
2. Start the Application.
3. Change the size of the Window, so that the Oscilloscope will be resized.
Comment 1 Wim Jongman CLA 2011-03-11 20:01:12 EST
Hi, thanks for your feature request. 

Seeing your drawing as it was before can be difficult.   

Everything you see on the screen is the "tail" or the "history" of the scope. Suppose this tail is 80 pixels long and you resize to 40 pixels. What should we do then? 

If you start stretching the window, you will also stretch the line. 

I agree that this is a nice option, but I also have to maintain additional arrays to keep the original untransformed value which takes away precious microseconds. 

Please take a look at the current build and give your comments on that. If you don't like it please let me know so I can revert.

The thing that is needed to preserve the drawing as much as possible, is to freeze the painting while we are dragging the window for resize. I need to figure out how to do that. 

Fix released to head, you can pickup the new jar here:

https://hudson.eclipse.org/hudson/view/Tycho%20+%20Maven/job/maven-nebula-1.0-nightly/lastSuccessfulBuild/artifact/
Comment 2 Michael Fröschen CLA 2011-03-14 06:02:52 EDT
This was fast.
Great work.
Thank you very much for the work and the fast reaction.

Regards,

Michael
Comment 3 Wim Jongman CLA 2011-03-14 09:28:29 EDT
(In reply to comment #2)
> This was fast.
> Great work.

Thanks ;). However, I am not happy yet. If you use the scope by using isPercentage(true) then the drawing gets warped because of transformation from and to percentages and pixels. 

You can see this in the snippet3. Let it draw some heartbeats, then resize to very small and then resize to big.

A solution is to not try to keep the scale when isPercentage is used but draw it like it was in the scale it was originally calculated for.
Comment 4 Wim Jongman CLA 2011-03-19 11:37:43 EDT
I will just draw the graph with the current absolute measurements when redrawing. I gave up on scaling if the value is a percentage. This can never work nicely unless I keep an array with the original values.

I think this new solution works nice apart from the flicker when resizing. I don't think that is a big problem.

Pick up the new jar from 

https://hudson.eclipse.org/hudson/view/Tycho%20+%20Maven/job/maven-nebula-1.0-nightly/lastSuccessfulBuild/artifact/

closing