Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Clipping bug in ChartView.draw

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
PeterJ Posted - 25 Aug 2010 : 18:02:04
We found a problem with the clipping code in ChartView.draw(). Link to the impact below where a QC plot is rendering over a covering panel (in this case a JSplitPane).

The problem was pretty simple. The clip rectangle is getting reset to thew whole plot image when it should remain to the clipping bounds that Swing has provided you. We made the change below and it fixed it.

This problem only shows up on graphics cards the the TYPE_IMAGE_BUFFER succeeds. We found the problem on a range of NVIDIA cards on Linux and Windows. Interestingly, under OS X the problem did not show up.

drawObject(g2, achartobj, drect);
- if (gtype == GraphicsDevice.TYPE_IMAGE_BUFFER)
- g2
- .setClip((int) drect.getX(),
- (int) drect.getY(), (int) drect
- .getWidth(), (int) drect
- .getHeight());
}
}
postDraw(g2);


6   L A T E S T    R E P L I E S    (Newest First)
PeterJ Posted - 30 Aug 2010 : 13:56:54
Just back from vacation. Will send you the code today/tomorrow. We just need a little work to totally rip it out of our test program so you don't need any of our code.
quinncurtis Posted - 26 Aug 2010 : 09:14:24
We did set the size to 0. Here is the basic code we used:

scrollapplication1 = new ScrollApplication1();
scrollapplication2 = new ScrollApplication1();

JSplitPane jspane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
     			  scrollapplication1, scrollapplication2);

Dimension minimumSize = new Dimension(0, 0);

jspane.setDividerLocation(200);

scrollapplication1.setMinimumSize(minimumSize) ;  	    
scrollapplication2.setMinimumSize(minimumSize) ;  
   	      	    
contentPane.add(jspane, BorderLayout.CENTER);


Each ScrollApplication1 object resizes to fit the size of the scroll pane, as the divider moves. Send us your own version if you would.
PeterJ Posted - 25 Aug 2010 : 22:22:05
by setting the minimum size to zero. We'll ship you the simplescroll graph example we built as you're right it is the easiest way to see it.
quinncurtis Posted - 25 Aug 2010 : 19:45:20
What did you do to prevent the ScrollApplication1 from resizing to fit the scroll pane?
PeterJ Posted - 25 Aug 2010 : 19:05:28
We can reproduce by putting two instances of SimpleScrollGraph onto a JSplitpane with the minimum sizes of each scroll graph set to zero. As you move the slide across you will see the issue. The best platform to reproduce in Linux and on NVIDIA. We're up to date with our Java (1.6)
quinncurtis Posted - 25 Aug 2010 : 18:35:09
We have Nvida boards in our PC's and we have never seen this problem. Can you modify one of our examples to reproduce it on your systems and send us the program?

That line is there to resolve problems we found with the reset of clipping when printing, and rendering charts to image files. So if you make the change you must check those things too. We didn't see anything bad when we removed it. It could be a bug that was resolved in subsequent releases of the Java runtime.

Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07