Project

General

Profile

Actions

Support #2300

closed
KD

Artefacts in rendering WPaintedWidget

Support #2300: Artefacts in rendering WPaintedWidget

Added by Anonymous almost 13 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Start date:
10/08/2013
Due date:
% Done:

0%

Estimated time:

Description

Hello! I am using WPaintedWidget to draw a map, map picture is generated (no matter how) and saved to png file, so in paint event I'm just painting this image using WPainter::drawImage. On mouse event I send request to generate new map picture and then repaint it in my widget (zoom etc.). When user interacts with map it is a lot of repaints, and widget is blinking, but it's not the most problem. Real problem is artefacts: at some times black rectangle appears and sometimes whole widget are becomes white. These artefacts appears and dissapers periodically while interacting with map. I'm now using HtmlCanvas as rendering method.

Do you have some idea how to get rid of these artefacts? And what is the best rendering method for this kind of task (frequently redraw image from png (or I can save to other format) file?

VV Updated by Vitaly Volochay almost 13 years ago Actions #1

And when I tried to use PngImage as rendering method WPainter::drawImage failed with error in log:
"[2013-Oct-08 15:56:33.394717] 13859 [/ PTWaf5tIt5QeoLhe] [error] "WRasterImage: drawImage failed: Unable to open file, /PTWaf5tIt5QeoLhe.png", where PTWaf5tIt5QeoLhe.png - is png-file with map.

KD Updated by Koen Deforche almost 13 years ago Actions #2

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

Hey,

The only motivation to need a painter to draw images is if you want to transform them in some way (e.g. rotation). Otherwise you're better off with using plain WImage or CSS background images? The artefacts you see are likely browser issues, unless you suspect not in which case a test case would be appreciated.

koen

VV Updated by Vitaly Volochay almost 13 years ago Actions #3

I need to draw some object over the map (picture) so I think I can't use WImage, is there a good way to set background image for my WPaintedWidget like this:
decorationStyle().setBackgroundImage("map.png");

and draw other objects with WPainter?

I tried InlineSvgVml as rendering method and artefacts seems to dissapear but image blinking even more.
And what about PngImage? (comment #1)

WD Updated by Wim Dumon almost 13 years ago Actions #4

The issue with pngimage is probably a wrong path? The path seems to be absolute and points to the root of your file system.

You can put a WPaintedWidget on top of a WImage. Use absolute positioning.

BR,
Wim.

VV Updated by Vitaly Volochay almost 13 years ago Actions #5

Tried:
decorationStyle().setBackgroundImage("map.png");

But had the same problem, artefacts and blinking..

WD Updated by Wim Dumon almost 13 years ago Actions #6

Please provide an example that demonstrates the issue.

Wim.

KD Updated by Koen Deforche over 11 years ago Actions #7

  • Tracker changed from Bug to Support
  • Status changed from Feedback to Closed
Actions

Also available in: PDF Atom