Bug 3905 - RestoreDC typo in font code
Summary: RestoreDC typo in font code
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: win32 backend (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: Owen Taylor
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-29 02:58 UTC by Daniel Stone
Modified: 2005-08-22 00:15 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.