lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 89c676d 009/156: Add pdf_writer_wx::get_page_


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 89c676d 009/156: Add pdf_writer_wx::get_page_height() helper
Date: Tue, 30 Jan 2018 17:21:51 -0500 (EST)

branch: master
commit 89c676d6b30202756a92058f4d826e0b01731bae
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>

    Add pdf_writer_wx::get_page_height() helper
    
    This is symmetric to the existing get_page_width() and there is no
    reason not to have it too.
---
 pdf_writer_wx.cpp | 5 +++++
 pdf_writer_wx.hpp | 1 +
 2 files changed, 6 insertions(+)

diff --git a/pdf_writer_wx.cpp b/pdf_writer_wx.cpp
index 1190a4d..c3b20ee 100644
--- a/pdf_writer_wx.cpp
+++ b/pdf_writer_wx.cpp
@@ -199,6 +199,11 @@ int pdf_writer_wx::get_total_width() const
     return total_page_size_.x;
 }
 
+int pdf_writer_wx::get_page_height() const
+{
+    return total_page_size_.y - 2 * vert_margin;
+}
+
 int pdf_writer_wx::get_page_bottom() const
 {
     return total_page_size_.y - vert_margin;
diff --git a/pdf_writer_wx.hpp b/pdf_writer_wx.hpp
index 21fccb0..20e1726 100644
--- a/pdf_writer_wx.hpp
+++ b/pdf_writer_wx.hpp
@@ -80,6 +80,7 @@ class pdf_writer_wx
     int get_vert_margin() const;
     int get_page_width()  const;
     int get_total_width() const;
+    int get_page_height() const;
     int get_page_bottom() const;
 
   private:



reply via email to

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