Bug 6301 - Empty image if destination region is bigger than source bitmap
Summary: Empty image if destination region is bigger than source bitmap
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 1.0.2
Hardware: Other Linux (All)
: high normal
Assignee: Owen Taylor
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-17 21:55 UTC by Alexander Darovsky
Modified: 2008-01-11 09:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (1.12 KB, patch)
2006-03-17 21:56 UTC, Alexander Darovsky
Details | Splinter Review

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.