Dmitry Timoshkov : gdiplus: Use an off-screen DC to trace a path.

Alexandre Julliard julliard at winehq.org
Wed Feb 20 14:01:14 CST 2013


Module: wine
Branch: master
Commit: 42a5943598eb908686e27554c2882617b6445bcf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=42a5943598eb908686e27554c2882617b6445bcf

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Wed Feb 20 14:18:56 2013 +0800

gdiplus: Use an off-screen DC to trace a path.

---

 dlls/gdiplus/region.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index f7bad57..5583514 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -894,7 +894,7 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
 
     if (!graphics)
     {
-        new_hdc = GetDC(0);
+        new_hdc = CreateCompatibleDC(0);
         if (!new_hdc)
             return OutOfMemory;
 
@@ -902,13 +902,13 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
         graphics = new_graphics;
         if (stat != Ok)
         {
-            ReleaseDC(0, new_hdc);
+            DeleteDC(new_hdc);
             return stat;
         }
     }
     else if (!graphics->hdc)
     {
-        graphics->hdc = new_hdc = GetDC(0);
+        graphics->hdc = new_hdc = CreateCompatibleDC(0);
         if (!new_hdc)
             return OutOfMemory;
     }
@@ -929,7 +929,7 @@ static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
     RestoreDC(graphics->hdc, save_state);
     if (new_hdc)
     {
-        ReleaseDC(0, new_hdc);
+        DeleteDC(new_hdc);
         if (new_graphics)
             GdipDeleteGraphics(new_graphics);
         else




More information about the wine-cvs mailing list