Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Drawing / Refresh problem/questions
Drawing / Refresh problem/questions [message #36129] Tue, 01 May 2012 23:01 Go to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
While testing my GrapCtrl Package, I noticed something:

When a report is generated using 'Upp::Report' and you display the report using 'Perform(rept)'. If you scroll in the Report Window the background window also gets Refreshed. So if the background is long to display, the report scrolling gets very slow ....

Why is the background window also refreshed, this does not seem logic to me ? Is it a Upp bug, or does my GraphCtrl package miss a 'needRefresh' bool or something like that (most likely the case)

????
Re: Drawing / Refresh problem/questions [message #36213 is a reply to message #36129] Sat, 12 May 2012 15:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Tue, 01 May 2012 17:01

While testing my GrapCtrl Package, I noticed something:

When a report is generated using 'Upp::Report' and you display the report using 'Perform(rept)'. If you scroll in the Report Window the background window also gets Refreshed. So if the background is long to display, the report scrolling gets very slow ....

Why is the background window also refreshed, this does not seem logic to me ? Is it a Upp bug, or does my GraphCtrl package miss a 'needRefresh' bool or something like that (most likely the case)

????



Never noticed this. Can you prepare a testcase please?

Mirek
Re: Drawing / Refresh problem/questions [message #36249 is a reply to message #36213] Wed, 16 May 2012 15:44 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Mirek,

I've been quite busy lately but I will make a test case shortly (this after noon maybe)
Re: Drawing / Refresh problem/questions [message #36253 is a reply to message #36249] Thu, 17 May 2012 00:23 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
I updated the GraphDraw_test package in sandbox to add a REPORT button.

I noticed the BUG for two reasons:

  • Repport scrolling is very bad
  • the 'sand' mouse icon appears while scrolling the repport ==> this means the backgrouong Graphs are beeing updated

[Updated on: Thu, 17 May 2012 00:23]

Report message to a moderator

Re: Drawing / Refresh problem/questions [message #36315 is a reply to message #36253] Sun, 20 May 2012 11:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Wed, 16 May 2012 18:23

I updated the GraphDraw_test package in sandbox to add a REPORT button.

I noticed the BUG for two reasons:

  • Repport scrolling is very bad
  • the 'sand' mouse icon appears while scrolling the repport ==> this means the backgrouong Graphs are beeing updated




Please, always report as much of your setup as possible. Is this X11 or Win32?
Re: Drawing / Refresh problem/questions [message #36316 is a reply to message #36253] Sun, 20 May 2012 11:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Wed, 16 May 2012 18:23

I updated the GraphDraw_test package in sandbox to add a REPORT button.

I noticed the BUG for two reasons:

  • Repport scrolling is very bad
  • the 'sand' mouse icon appears while scrolling the repport ==> this means the backgrouong Graphs are beeing updated




In Linux, example freezes at start. I believe it might well be related.

EDIT: Not really freezes, but is extremely slow. Still might be related Smile
Re: Drawing / Refresh problem/questions [message #36318 is a reply to message #36316] Sun, 20 May 2012 12:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Should be now fixed. Please check. Thanks for reporting.

Mirek
Re: Drawing / Refresh problem/questions [message #36319 is a reply to message #36318] Sun, 20 May 2012 16:24 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Mirek,

Sorry, I forgot to say I was using Linux.

The drawing is very slow intentionnaly ==> it's intended to show the behaviour with very big datasets and that graph scrolling still works fast and smooth

I will check the correction right now.
Re: Drawing / Refresh problem/questions [message #36320 is a reply to message #36319] Sun, 20 May 2012 16:34 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Great, it works fine !-)

Just one more question:

In my example, the BIG DATA SET graph is very long to draw, so I would like to bufferise the image generated in order to do the drawing only when necessary (rescalling, ...) but not when some other window disappeared for example.

Is there something 'out of the box' I can use for this ?
Re: Drawing / Refresh problem/questions [message #36326 is a reply to message #36320] Sun, 20 May 2012 17:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Sure. Fastest would be to use ImageDraw (or ImagePainter) to buffer it.

Actually, this is something done in Report too - you can check it.
Re: Drawing / Refresh problem/questions [message #36365 is a reply to message #36326] Wed, 23 May 2012 00:01 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
OK thanks.

What difference do you make between ImageDraw and ImageBuffer ???
Is one Draw flavor and the other one Painter flavor ?

They work pretty much the same way:
ImageBuffer ib(size);
BufferPainter bp(ib, mode);
Paint(bp, scale);

or
ImageDraw ib(size);
Paint(ib, scale);
Re: Drawing / Refresh problem/questions [message #36380 is a reply to message #36365] Wed, 23 May 2012 14:52 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Tue, 22 May 2012 18:01

OK thanks.

What difference do you make between ImageDraw and ImageBuffer ???
Is one Draw flavor and the other one Painter flavor ?

They work pretty much the same way:
ImageBuffer ib(size);
BufferPainter bp(ib, mode);
Paint(bp, scale);

or
ImageDraw ib(size);
Paint(ib, scale);



ImageDraw uses host platform to draw, resulting in Image handles that can be directly used.

BufferPainter is rather intended for in-memory rendering and does not require CtrlCore.
Previous Topic: new: CRC handling class
Next Topic: U++ on Code::Blocks (MinGW)
Goto Forum:
  


Current Time: Thu Mar 28 17:55:23 CET 2024

Total time taken to generate the page: 0.00942 seconds