lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 6465704 04/15: Restore the use of wxDCClipper


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 6465704 04/15: Restore the use of wxDCClipper in PDF table generation code
Date: Fri, 27 Jul 2018 17:23:15 -0400 (EDT)

branch: master
commit 6465704ed66d2dcd14a44a209c8f6ab0c83643a8
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Restore the use of wxDCClipper in PDF table generation code
    
    The bug which resulted in the use of wxDCClipper leading to upside-down
    text on the following pages was really fixed by adding the missing calls
    to wxPdfDC::EndPage() in the previous commit and there is no reason not
    to use it any longer.
    
    This reverts (the really significant part of) the commit
    f7e2663350f61c25a6c4f40a43c75859c35ed506
---
 wx_table_generator.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 9d745e8..5b7fa14 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -479,14 +479,14 @@ void wx_table_generator::do_output_single_row
                 // Make sure that any failure in this chain of assumptions
                 // doesn't result in (undefined) negative clipping.
                 LMI_ASSERT(0 <= ci.col_width() - column_margin());
-                dc_.SetClippingRegion
-                    (wxRect
+                wxDCClipper clip
+                    (dc_
+                    ,wxRect
                         {wxPoint{pos_x, y_top}
                         ,wxSize{ci.col_width() - column_margin(), row_height_}
                         }
                     );
                 dc_.DrawText(s, x_text, y_text);
-                dc_.DestroyClippingRegion();
                 }
             else
                 {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]