niptucker / paint-mono

Automatically exported from code.google.com/p/paint-mono
Other
0 stars 0 forks source link

Image loading leaves a black image after loading. #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to open PNG files results in the error "Error Opening File" with no
more details than that. 

Original issue reported on code.google.com by miguel.d...@gmail.com on 12 May 2007 at 11:32

GoogleCodeExporter commented 9 years ago
After loading the canvas is rendered in black, forcing a refresh makes the 
image come
up.   

Original comment by miguel.d...@gmail.com on 12 May 2007 at 11:44

GoogleCodeExporter commented 9 years ago
I've tracked this down to some kind of problem with libgdiplus, or possibly 
cairo. 
On startup, the canvas is painted white with one call to Graphics.FillRectangle 
(SurfaceBox.OnPaint), but the paint apparently never happens, the area is 
transparent until a refresh is forced.

Changing the Fill call to use X directy with a corresponding XFillRectangle 
call 
works properly, so the window is getting the right expose events at the right 
time. 
libgdiplus/cairo is using is a bit more envolved, but it ends up doing 
cairo_rectangle and cairo_fill (which uses XRenderFillRectangle), and that code 
path 
is used extensively in System.Drawing, so I'm not sure what's going on here... 
request caching, not flushing properly?

For now, I'll leave an extra Invalidate call to force a new paint event, which 
refreshes the window properly, while this issue is investigated.

Original comment by shana.u...@gmail.com on 11 Oct 2008 at 9:50

GoogleCodeExporter commented 9 years ago

Original comment by shana.u...@gmail.com on 11 Oct 2008 at 10:23

GoogleCodeExporter commented 9 years ago
Related libgdiplus bug #434568 opened (https://bugzilla.novell.com/show_bug.cgi?
id=434568)

Original comment by shana.u...@gmail.com on 11 Oct 2008 at 10:38