Bug 3905

Summary: RestoreDC typo in font code
Product: cairo Reporter: Daniel Stone <daniel>
Component: win32 backendAssignee: Owen Taylor <otaylor>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 0.9.3   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:

Description FreeDesktop Bugzilla Database Corruption Fix User 2005-07-29 02:58:04 UTC
In cairo-win32-font.c when it does RestoreDC (surface->dc, 1); it should be
passing -1 instead to restore to the previous save instead of to the first one.
Comment 1 Owen Taylor 2005-07-29 03:16:29 UTC
Not a typo, rather the online docs are garbled ,and say in a self-contradictory
fashion:

 [in] Specifies the saved state to be restored. If this parameter is positive,  
 nSavedDC represents a specific instance of the state to be restored. If this 
 parameter is negative, nSavedDC represents an instance relative to the current 
 state. For example, 1 restores the most recently saved state.

2005-07-28  Owen Taylor  <otaylor@redhat.com>

        * src/cairo-win32-font.c (_draw_glyphs_on_surface): Pass
        -1 not 1 to RestoreDC to restore to the last SaveDC.
        (#3905, Stuart Parmenter)
Comment 2 Carl Worth 2005-08-22 17:15:45 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

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.