~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Classes/Atomic/rectangles.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2008-04-06 15:11:41 UTC
  • mfrom: (1.1.7 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080406151141-w0sg20jnv86mlt6f
Tags: 1:1.0.6.14-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* 01_american.dpatch is updated
* Since thread support in guile-1.8 is now disabled, the segmentation faults
  should not arise anymore. More info at #439923. (Closes: #450499, #458685)
[kohda]
* This version fixed menu problem.  (Closes: #447083)
* Reverted orig.tar.gz to the upstream tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/******************************************************************************
3
 
* MODULE     : rectangles.hpp
4
 
* DESCRIPTION: Rectangles and lists of rectangles with reference counting.
5
 
*              Used in graphical programs.
6
 
* COPYRIGHT  : (C) 1999  Joris van der Hoeven
7
 
*******************************************************************************
8
 
* This software falls under the GNU general public license and comes WITHOUT
9
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
10
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
11
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12
 
******************************************************************************/
13
 
 
14
 
#ifndef RECTANGLES_H
15
 
#define RECTANGLES_H
16
 
#include "list.hpp"
17
 
 
18
 
class rectangle_rep: concrete_struct {
19
 
public:
20
 
  SI x1, y1;
21
 
  SI x2, y2;
22
 
 
23
 
  rectangle_rep (SI x1b, SI y1b, SI x2b, SI y2b);
24
 
  friend class rectangle;
25
 
};
26
 
 
27
 
class rectangle {
28
 
  CONCRETE(rectangle);
29
 
  rectangle (SI x1b=0, SI y1b=0, SI x2b=0, SI y2b=0);
30
 
  operator tree ();
31
 
};
32
 
CONCRETE_CODE(rectangle);
33
 
 
34
 
ostream& operator << (ostream& out, rectangle r);
35
 
rectangle copy (rectangle r);
36
 
bool operator == (rectangle r1, rectangle r2);
37
 
bool operator != (rectangle r1, rectangle r2);
38
 
bool intersect (rectangle r1, rectangle r2);
39
 
bool operator <= (rectangle r1, rectangle r2);
40
 
rectangle translate (rectangle r, SI x, SI y);
41
 
rectangle operator * (rectangle r, int d);
42
 
rectangle operator / (rectangle r, int d);
43
 
double area (rectangle r);
44
 
 
45
 
typedef list<rectangle> rectangles;
46
 
 
47
 
rectangles operator - (rectangles l1, rectangles l2);
48
 
rectangles operator & (rectangles l1, rectangles l2);
49
 
rectangles operator | (rectangles l1, rectangles l2);
50
 
rectangles operator * (rectangles l, int d);
51
 
rectangles operator / (rectangles l, int d);
52
 
rectangles translate (rectangles l, SI x, SI y);
53
 
rectangles thicken (rectangles l, SI width, SI height);
54
 
rectangles outline (rectangles l, SI pixel);
55
 
rectangles correct (rectangles l);
56
 
rectangles simplify (rectangles l);
57
 
rectangle  least_upper_bound (rectangles l);
58
 
double area (rectangles r);
59
 
 
60
 
#endif // defined RECTANGLES_H