uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp
branchRCL_3
changeset 22 7c5dd702d6d3
parent 10 88b23e2e82e1
child 24 f93c875b566e
--- a/uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp	Tue Apr 27 17:34:42 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/huicanvaswshwgc.cpp	Tue May 11 17:03:00 2010 +0300
@@ -987,9 +987,11 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));
                 }
             
             // Draw            
@@ -998,6 +1000,7 @@
             if (cachedImage->iUseColorModulation)
                 {
                 iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetOpacity(oldOpacity);
                 }
             }        
         }
@@ -1027,9 +1030,11 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));    
                 }
             
             // Draw            
@@ -1038,6 +1043,7 @@
             if (cachedImage->iUseColorModulation)
                 {
                 iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetOpacity(oldOpacity);
                 }
             }
         }
@@ -1068,10 +1074,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));    
                 }
     
             // Draw            
@@ -1079,7 +1087,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }
         }
@@ -1114,10 +1123,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));    
                 }
     
             // Draw            
@@ -1125,7 +1136,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }    
         }
@@ -1160,10 +1172,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));    
                 }
     
             // Draw            
@@ -1171,7 +1185,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }    
         }
@@ -1205,9 +1220,11 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));
                 }
     
             // Draw            
@@ -1215,7 +1232,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }    
         }
@@ -1248,9 +1266,11 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));    
                 }
     
             // Draw            
@@ -1258,7 +1278,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor); 
+                iCanvasGc->SetOpacity(oldOpacity);                       
                 }
             }
         }
@@ -1292,10 +1313,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));  
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));  
                 }
     
             // Draw            
@@ -1303,7 +1326,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor); 
+                iCanvasGc->SetOpacity(oldOpacity);                       
                 }
             }
         }
@@ -1341,10 +1365,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor)); 
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));   
                 }
     
             // Draw            
@@ -1352,7 +1378,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }
         }
@@ -1390,10 +1417,12 @@
             destinationRect.Move(-dx,-dy);
             
             TRgb oldPenColor = iCanvasGc->PenColor();
+            TReal32 oldOpacity = iCanvasGc->Opacity();
             if (cachedImage->iUseColorModulation)
                 {
                 DrawTextBrush( destinationRect );
-                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));    
+                iCanvasGc->SetPenColor(ConvertToLinear(iWsPenColor));  
+                iCanvasGc->SetOpacity(TReal32(iWsPenColor.Alpha() / 255.f));  
                 }
     
             // Draw            
@@ -1401,7 +1430,8 @@
     
             if (cachedImage->iUseColorModulation)
                 {
-                iCanvasGc->SetPenColor(oldPenColor);                        
+                iCanvasGc->SetPenColor(oldPenColor);
+                iCanvasGc->SetOpacity(oldOpacity);                        
                 }
             }
         }