uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp
changeset 13 8f67d927ea57
parent 0 15bf7259bb7c
child 14 83d2d132aa58
--- a/uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp	Tue Feb 02 07:56:43 2010 +0200
+++ b/uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp	Fri Mar 19 09:43:21 2010 +0200
@@ -657,16 +657,30 @@
            }
         UseWsState();
         
-        if ( aFillRule == MWsGraphicsContext::EAlternate )
+        if (iWsBrushStyle == MWsGraphicsContext::ENullBrush)
             {
-            iCanvasGc->SetPolygonDrawMode( EHuiFillEvenOdd );
+            // nullbrush, but pen style set
+            // -> draw non filled polygon and 
+            // use pencolor
+            iCanvasGc->SetPolygonDrawMode( EHuiNoFill );
+            iCanvasGc->SetPenColor(iWsPenColor);            
+            iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));       
+
             }
-        if ( aFillRule == MWsGraphicsContext::EWinding )
-            {        
-            iCanvasGc->SetPolygonDrawMode( EHuiFillNonZero );
+        else
+            {
+            if ( aFillRule == MWsGraphicsContext::EAlternate )
+                {
+                iCanvasGc->SetPolygonDrawMode( EHuiFillEvenOdd );
+                }
+            if ( aFillRule == MWsGraphicsContext::EWinding )
+                {        
+                iCanvasGc->SetPolygonDrawMode( EHuiFillNonZero );
+                }
+            iCanvasGc->SetPenColor(iWsBrushColor);            
+            iCanvasGc->SetOpacity(TReal32(iWsBrushColor.Alpha() / 255.f));       
             }
-        iCanvasGc->SetPenColor(iWsPenColor);            
-        iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));       
+            
         iCanvasGc->SetDrawMode(SelectCanvasDrawMode(iWsDrawMode));        
             
         iCanvasGc->DrawPolygon( points );
@@ -2067,7 +2081,8 @@
             TRgb oldColor = gc->PenColor();            
             gc->SetPenAlpha(0);
             gc->SetPenColor(KRgbBlue);
-            gc->Clear(); 
+            TRect rect = aUpdateRegion.BoundingRect();
+            gc->Clear(rect); 
             gc->SetPenAlpha(oldAlpha);
             gc->SetPenColor(oldColor);
             }
@@ -2106,6 +2121,7 @@
     // Set new clipping region which does not clip anything. 
     // We want always draw aUpdateRegion fully to the aRenderbuffer. 
     TRect displayArea = iCanvasGc->Gc()->DisplayArea(); 
+    
     iCanvasGc->Gc()->SetClip(displayArea); // this call does not transform region anymore
     
     // We use translation to get screen coordinates to match render buffer coordinates