Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image loading leaves a black image after loading. #3

Closed
GoogleCodeExporter opened this issue Jun 3, 2015 · 4 comments
Closed

Image loading leaves a black image after loading. #3

GoogleCodeExporter opened this issue Jun 3, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed title: Image loading leaves a black image after loading.

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Changed state: FixUnderReview

@GoogleCodeExporter
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant