]> git.saurik.com Git - wxWidgets.git/commitdiff
document that text drawing is not affected by the current logical function and update...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Aug 2008 21:14:58 +0000 (21:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Aug 2008 21:14:58 +0000 (21:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/dc.h
samples/drawing/drawing.cpp

index ab5adfc09ea9410534f379a10bae73b9bb19164a..1b4806a566938b5bfef9a1ec625f7a04987929ac 100644 (file)
@@ -445,10 +445,8 @@ public:
         the string. See GetTextExtent() for how to get the dimensions of a text
         string, which can be used to position the text more precisely.
 
-        @note Under wxGTK, the current
-              @ref GetLogicalFunction() "logical function" is used by this
-              function but it is ignored by wxMSW. Thus, you should avoid using
-              logical functions with this function in portable programs.
+        @note The current @ref GetLogicalFunction() "logical function" is 
+              ignored by this function.
     */
     void DrawText(const wxString& text, wxCoord x, wxCoord y);
 
@@ -911,6 +909,7 @@ public:
         determines how a source pixel (from a pen or brush colour, or source
         device context if using Blit()) combines with a destination pixel in
         the current device context.
+        Text drawing is not affected by this function.
 
         The possible values and their meaning in terms of source and
         destination pixel values are as follows:
index 1616c81626505c149928b4e76ebb2ab5a08144b4..8a41242bd56c1695ca6921b492f43aa4bb46fa58 100644 (file)
@@ -811,20 +811,20 @@ void MyCanvas::DrawText(wxDC& dc)
     // test the logical function effect
     wxCoord y = 150;
     dc.SetLogicalFunction(wxINVERT);
-    dc.DrawText( _T("There should be no text below"), 110, 150 );
+    // text drawing should ignore logical function
+    dc.DrawText( _T("There should be a text below"), 110, 150 );
     dc.DrawRectangle( 110, y, 100, height );
 
-    // twice drawn inverted should result in invisible
     y += height;
-    dc.DrawText( _T("Invisible text"), 110, y );
+    dc.DrawText( _T("Visible text"), 110, y );
     dc.DrawRectangle( 110, y, 100, height );
-    dc.DrawText( _T("Invisible text"), 110, y );
+    dc.DrawText( _T("Visible text"), 110, y );
     dc.DrawRectangle( 110, y, 100, height );
     dc.SetLogicalFunction(wxCOPY);
 
     y += height;
     dc.DrawRectangle( 110, y, 100, height );
-    dc.DrawText( _T("Visible text"), 110, y );
+    dc.DrawText( _T("Another visible text"), 110, y );
 }
 
 static const struct