Implemented printing (finally)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@272 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-21 15:59:39 +00:00
parent 5327520646
commit 4ac5ef8481
3 changed files with 168 additions and 30 deletions
+25
View File
@@ -10,8 +10,11 @@
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <util/reflect.hpp>
#include <util/real_point.hpp>
DECLARE_POINTER_TYPE(Set);
class StyleSheet;
// ----------------------------------------------------------------------------- : Printing
@@ -21,5 +24,27 @@ void print_preview(Window* parent, const SetP& set);
/// Print the given set
void print_set(Window* parent, const SetP& set);
// ----------------------------------------------------------------------------- : Layout
/// Layout of a page of cards
class PageLayout {
public:
PageLayout();
PageLayout(const StyleSheet& stylesheet, const RealSize& page_size);
RealSize page_size; ///< Size of a page (in millimetres)
RealSize card_size; ///< Size of a card (in millimetres)
RealSize card_spacing; ///< Spacing between cards (in millimetres)
double margin_left, margin_right, margin_top, margin_bottom; ///< Page margins (in millimetres)
int rows, cols; ///< Number of rows/columns of cards
bool card_landscape; ///< Are cards rotated to landscape orientation?
/// The number of cards per page
inline int cardsPerPage() const { return rows * cols; }
private:
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF
#endif