Bug 6301

Summary: Empty image if destination region is bigger than source bitmap
Product: cairo Reporter: Alexander Darovsky <adarovsky>
Component: win32 backendAssignee: Owen Taylor <otaylor>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: chris
Version: 1.0.2   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: fix

Description Alexander Darovsky 2006-03-17 21:55:32 UTC
Here is a little bug in win32 backend, which, however, causes  
AlphaBlend to fail with "invalid argument" error code.   
  
The problem arises when src_x or src_y < 0, or when width or height is 
bigger than source bitmap. Applied patch solves this problem, and also 
fixes LoadLibrary issue. We must call LoadLibraryA or enclose "msimg32" 
into special macro.
Comment 1 Alexander Darovsky 2006-03-17 21:56:58 UTC
Created attachment 4980 [details] [review]
fix

This patch fixes problems with msimg32 loading and AlphaBlend call
Comment 2 Chris Wilson 2008-01-11 09:07:55 UTC
Adrian Johnson fixed the LoadLibraryA issue with commit f20a1a40c3f6d95b4dc89ae4198ad81b7092450c.

However, it should be impossible for AlphaBlend() to be called with a src rectangle that lies outside the source as it is fixed up by the caller (_cairo_win32_surface_composite, lines 1042-66 and added in commit 68ed40b6da242816a43cd68cc2c7feb779cf0acf by Vladimir Vukicevic).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.