]> git.saurik.com Git - wxWidgets.git/commitdiff
offseting the graphics context correctly
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 20 Oct 2006 16:41:18 +0000 (16:41 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 20 Oct 2006 16:41:18 +0000 (16:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 3183451f176ff190d5be6d3744c68f9f567d65d9..6991424ffcd59ef4e2466bc6192f74d7247d8e09 100644 (file)
@@ -251,6 +251,10 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
 
                     {
                         wxMacCGContextStateSaver sg( cgContext ) ;
 
                     {
                         wxMacCGContextStateSaver sg( cgContext ) ;
+                        // make sure the context is having its origin at the wx-window coordinates of the 
+                        // view (read at the top of this file about the differences)
+                                               if ( thisWindow->MacGetLeftBorderSize() != 0 || thisWindow->MacGetTopBorderSize() != 0 )
+                                                       CGContextTranslateCTM( cgContext , -thisWindow->MacGetLeftBorderSize() , -thisWindow->MacGetTopBorderSize() );
                         float alpha = 1.0 ;
                         {
                             wxWindow* iter = thisWindow ;
                         float alpha = 1.0 ;
                         {
                             wxWindow* iter = thisWindow ;