diff options
author | scuri <scuri> | 2010-05-12 20:38:46 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-05-12 20:38:46 +0000 |
commit | b7d97c7ed82f0d0472cf0c2ae5d61e99a73b33a8 (patch) | |
tree | 0da03500210df1ac835203e2bb83748564e67423 /src/win32/cdwnative.c | |
parent | afaff9e085b51c822f0ce31ac91cc8196bfa5113 (diff) |
New Cairo driver
Diffstat (limited to 'src/win32/cdwnative.c')
-rw-r--r-- | src/win32/cdwnative.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/win32/cdwnative.c b/src/win32/cdwnative.c index 69623e1..3534c6e 100644 --- a/src/win32/cdwnative.c +++ b/src/win32/cdwnative.c @@ -44,7 +44,6 @@ static int cdactivate(cdCtxCanvas *ctxcanvas) if (ctxcanvas->hWnd) { RECT rect; - HDC ScreenDC; GetClientRect(ctxcanvas->hWnd, &rect); ctxcanvas->canvas->w = rect.right - rect.left; ctxcanvas->canvas->h = rect.bottom - rect.top; @@ -52,12 +51,7 @@ static int cdactivate(cdCtxCanvas *ctxcanvas) ctxcanvas->canvas->w_mm = ((double)ctxcanvas->canvas->w) / ctxcanvas->canvas->xres; ctxcanvas->canvas->h_mm = ((double)ctxcanvas->canvas->h) / ctxcanvas->canvas->yres; - ScreenDC = GetDC(NULL); - ctxcanvas->canvas->bpp = GetDeviceCaps(ScreenDC, BITSPIXEL); - ReleaseDC(NULL, ScreenDC); - - if (ctxcanvas->canvas->use_matrix) - ctxcanvas->canvas->cxTransform(ctxcanvas, ctxcanvas->canvas->matrix); + ctxcanvas->canvas->bpp = cdGetScreenColorPlanes(); } /* Se nao e' ownwer, tem que restaurar o contexto */ @@ -70,6 +64,9 @@ static int cdactivate(cdCtxCanvas *ctxcanvas) cdwRestoreDC(ctxcanvas); } + if (ctxcanvas->canvas->use_matrix) + ctxcanvas->canvas->cxTransform(ctxcanvas, ctxcanvas->canvas->matrix); + return CD_OK; } |