mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user