~ubuntu-branches/ubuntu/feisty/photoprint/feisty

« back to all changes in this revision

Viewing changes to support/signature.h

  • Committer: Bazaar Package Importer
  • Author(s): Milan Zamazal
  • Date: 2006-09-29 12:18:16 UTC
  • Revision ID: james.westby@ubuntu.com-20060929121816-6t2iz9zaymixd3om
Tags: upstream-0.3.3
ImportĀ upstreamĀ versionĀ 0.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * signature.h - class to handle coordinate calculations for n-up rectangular layouts
 
3
 *
 
4
 * Copyright (c) 2004 by Alastair M. Robinson
 
5
 * Distributed under the terms of the GNU General Public License -
 
6
 * see the file named "COPYING" for more details.
 
7
 *
 
8
 */
 
9
 
 
10
#ifndef SIGNATURE_H
 
11
#define SIGNATURE_H
 
12
 
 
13
#include "pageextent.h"
 
14
#include "layoutrectangle.h"
 
15
 
 
16
#define DEFAULTGUTTER 15
 
17
 
 
18
 
 
19
class LayoutRectangle;
 
20
 
 
21
class Signature : public PageExtent
 
22
{
 
23
        public:
 
24
        Signature(int rows=1,int columns=1);
 
25
        Signature(PageExtent &extent,int rows=1,int columns=1);
 
26
        ~Signature()
 
27
        {
 
28
        }
 
29
        void SetPageExtent(PageExtent &pe);
 
30
        void SetPaperSize(int width,int height);
 
31
        void SetMargins(int left,int right,int top,int bottom);
 
32
        void SetGutters(int hgutter,int vgutter);
 
33
        void SetColumns(int columns);
 
34
        void SetRows(int rows);
 
35
        int GetColumns()
 
36
        {
 
37
                return columns;
 
38
        }
 
39
        int GetRows()
 
40
        {
 
41
                return rows;
 
42
        }
 
43
        int GetHGutter()
 
44
        {
 
45
                return hgutter;
 
46
        }
 
47
        int GetVGutter()
 
48
        {
 
49
                return vgutter;
 
50
        }
 
51
        LayoutRectangle *GetLayoutRectangle(int row,int column);
 
52
        void EqualiseMargins();
 
53
        void ReCalc();
 
54
        int ColumnAt(int xpos);
 
55
        int RowAt(int ypos);
 
56
        private:
 
57
        int hgutter,vgutter;
 
58
        int rows,columns;
 
59
        float celwidth,celheight;
 
60
};
 
61
 
 
62
#endif