~ubuntu-branches/ubuntu/intrepid/tcm/intrepid

« back to all changes in this revision

Viewing changes to doc/sourcecode/Rectangle.html

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador
  • Date: 2003-07-03 20:08:21 UTC
  • Revision ID: james.westby@ubuntu.com-20030703200821-se4xtqx25e5miczi
Tags: upstream-2.20
ImportĀ upstreamĀ versionĀ 2.20

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head><TITLE>Rectangle</TITLE></head>
 
2
<body>
 
3
<H2><A HREF ="#DOC.DOCU" > <IMG BORDER=0 SRC=down.gif></A>  class  Rectangle  </H2><BLOCKQUOTE>
 
4
 rectangle ADT, defined by x, y, width and height.
 
5
</BLOCKQUOTE>
 
6
<hr>
 
7
 
 
8
<DL>
 
9
<TABLE>
 
10
<DT><h3>Public Fields</h3><DD><TR><TD VALIGN=top><A HREF="#DOC.270.1"> <IMG BORDER=0 SRC=icon1.gif></A> static  const  <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> </TD><TD><B>ZERO</B> <br>
 
11
<I></I>
 
12
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.16"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>x</B> <br>
 
13
<I> the left x-coordinate of the rectangle</I>
 
14
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.17"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>y</B> <br>
 
15
<I> the top y coordinate of the rectangle</I>
 
16
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.18"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>width</B> <br>
 
17
<I> the width of the rectangle</I>
 
18
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.19"> <IMG BORDER=0 SRC=icon1.gif></A> int </TD><TD><B>height</B> <br>
 
19
<I> the height of the rectangle</I>
 
20
</TD></TR></TABLE><TABLE>
 
21
<DT><h3>Public Methods</h3><DD><TR><TD VALIGN=top><A HREF="#DOC.270.2"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Rectangle</B> (int a = 0, int b = 0, int w = 0, int h=0)<br>
 
22
<I> Construct and initialize new rectangle.</I>
 
23
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.3"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Rectangle</B> (int w, int h)<br>
 
24
<I> Construct and initialize new rectangle.</I>
 
25
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.4"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Rectangle</B> (int d)<br>
 
26
<I> Construct and initialize new rectangle.</I>
 
27
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.5"> <IMG BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Rectangle</B> (<!1><A HREF="Point.html">Point</A> origin, <!1><A HREF="Point.html">Point</A> extent)<br>
 
28
<I> Construct and initialize new rectangle.</I>
 
29
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.6"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>Set</B> (int a, int b, int w, int h)<br>
 
30
<I> Reshape rectangle.</I>
 
31
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.7"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>SetPosition</B> (int a, int b)<br>
 
32
<I> Set rectangle position.</I>
 
33
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.8"> <IMG BORDER=0 SRC=icon1.gif></A> void </TD><TD><B>Move</B> (int a, int b)<br>
 
34
<I> Move rectangle position.</I>
 
35
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.9"> <IMG BORDER=0 SRC=icon1.gif></A> bool </TD><TD><B>Inside</B> (<!1><A HREF="Point.html">Point</A> p) const <br>
 
36
<I> Return if point (a,b) is inside rectangle.</I>
 
37
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.10"> <IMG BORDER=0 SRC=icon1.gif></A> bool </TD><TD><B>Inside</B> (int a, int b) const <br>
 
38
<I> Return if point (a,b) is inside rectangle.</I>
 
39
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.11"> <IMG BORDER=0 SRC=icon1.gif></A> bool </TD><TD><B>Intersects</B> (<!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A>* r) const <br>
 
40
<I> Return if rectangle r intersects with 'this'.</I>
 
41
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.12"> <IMG BORDER=0 SRC=icon1.gif></A> friend  bool </TD><TD><B>operator==</B> (const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.16">x</A>, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.17">y</A>)<br>
 
42
<I> Return whether rectangles are equal.</I>
 
43
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.13"> <IMG BORDER=0 SRC=icon1.gif></A> friend  bool </TD><TD><B>operator!=</B> (const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.16">x</A>, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.17">y</A>)<br>
 
44
<I> Return whether rectangles are unequal.</I>
 
45
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.14"> <IMG BORDER=0 SRC=icon1.gif></A> friend  ostream& </TD><TD><B>operator<<</B> (ostream &s, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> r)<br>
 
46
<I> Write string representation to ostream.</I>
 
47
</TD></TR><TR><TD VALIGN=top><A HREF="#DOC.270.15"> <IMG BORDER=0 SRC=icon1.gif></A> friend  istream& </TD><TD><B>operator>></B> (istream &s, <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &r)<br>
 
48
<I> Read string representation from istream.</I>
 
49
</TD></TR></TABLE></DL>
 
50
<A NAME="DOC.DOCU">
 
51
<hr>
 
52
 <h2> Documentation </h2>
 
53
<BLOCKQUOTE>
 
54
 rectangle ADT, defined by x, y, width and height.
 
55
 
 
56
</BLOCKQUOTE>
 
57
<DL>
 
58
 
 
59
<A NAME="ZERO">
 
60
<A NAME ="DOC.270.1">
 
61
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> static  const  <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A>  ZERO</B></TT>
 
62
<DL></DL><P>
 
63
<A NAME="Rectangle">
 
64
<A NAME ="DOC.270.2">
 
65
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B>  Rectangle(int a = 0, int b = 0, int w = 0, int h=0)</B></TT>
 
66
<DD> Construct and initialize new rectangle.
 
67
<DL></DL><P>
 
68
<A NAME="Rectangle">
 
69
<A NAME ="DOC.270.3">
 
70
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B>  Rectangle(int w, int h)</B></TT>
 
71
<DD> Construct and initialize new rectangle.
 
72
<DL></DL><P>
 
73
<A NAME="Rectangle">
 
74
<A NAME ="DOC.270.4">
 
75
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B>  Rectangle(int d)</B></TT>
 
76
<DD> Construct and initialize new rectangle.
 
77
<DL></DL><P>
 
78
<A NAME="Rectangle">
 
79
<A NAME ="DOC.270.5">
 
80
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B>  Rectangle(<!1><A HREF="Point.html">Point</A> origin, <!1><A HREF="Point.html">Point</A> extent)</B></TT>
 
81
<DD> Construct and initialize new rectangle.
 
82
<DL></DL><P>
 
83
<A NAME="Set">
 
84
<A NAME ="DOC.270.6">
 
85
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void  Set(int a, int b, int w, int h)</B></TT>
 
86
<DD> Reshape rectangle.
 
87
<DL></DL><P>
 
88
<A NAME="SetPosition">
 
89
<A NAME ="DOC.270.7">
 
90
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void  SetPosition(int a, int b)</B></TT>
 
91
<DD> Set rectangle position.
 
92
<DL></DL><P>
 
93
<A NAME="Move">
 
94
<A NAME ="DOC.270.8">
 
95
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> void  Move(int a, int b)</B></TT>
 
96
<DD> Move rectangle position.
 
97
<DL></DL><P>
 
98
<A NAME="Inside">
 
99
<A NAME ="DOC.270.9">
 
100
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> bool  Inside(<!1><A HREF="Point.html">Point</A> p) const </B></TT>
 
101
<DD> Return if point (a,b) is inside rectangle.
 
102
<DL></DL><P>
 
103
<A NAME="Inside">
 
104
<A NAME ="DOC.270.10">
 
105
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> bool  Inside(int a, int b) const </B></TT>
 
106
<DD> Return if point (a,b) is inside rectangle.
 
107
<DL></DL><P>
 
108
<A NAME="Intersects">
 
109
<A NAME ="DOC.270.11">
 
110
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> bool  Intersects(<!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A>* r) const </B></TT>
 
111
<DD> Return if rectangle r intersects with 'this'.
 
112
<DL></DL><P>
 
113
<A NAME="operator==">
 
114
<A NAME ="DOC.270.12">
 
115
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend  bool  operator==(const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.16">x</A>, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.17">y</A>)</B></TT>
 
116
<DD> Return whether rectangles are equal.
 
117
<DL></DL><P>
 
118
<A NAME="operator!=">
 
119
<A NAME ="DOC.270.13">
 
120
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend  bool  operator!=(const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.16">x</A>, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &<!2><A HREF="Rectangle.html#DOC.270.17">y</A>)</B></TT>
 
121
<DD> Return whether rectangles are unequal.
 
122
<DL></DL><P>
 
123
<A NAME="operator<<">
 
124
<A NAME ="DOC.270.14">
 
125
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend  ostream&  operator<<(ostream &s, const <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> r)</B></TT>
 
126
<DD> Write string representation to ostream.
 
127
<DL></DL><P>
 
128
<A NAME="operator>>">
 
129
<A NAME ="DOC.270.15">
 
130
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> friend  istream&  operator>>(istream &s, <!2><A HREF="Rectangle.html#DOC.270.2">Rectangle</A> &r)</B></TT>
 
131
<DD> Read string representation from istream.
 
132
<DL></DL><P>
 
133
<A NAME="x">
 
134
<A NAME ="DOC.270.16">
 
135
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int  x</B></TT>
 
136
<DD> the left x-coordinate of the rectangle
 
137
<DL></DL><P>
 
138
<A NAME="y">
 
139
<A NAME ="DOC.270.17">
 
140
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int  y</B></TT>
 
141
<DD> the top y coordinate of the rectangle
 
142
<DL></DL><P>
 
143
<A NAME="width">
 
144
<A NAME ="DOC.270.18">
 
145
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int  width</B></TT>
 
146
<DD> the width of the rectangle
 
147
<DL></DL><P>
 
148
<A NAME="height">
 
149
<A NAME ="DOC.270.19">
 
150
<DT><IMG BORDER=0 SRC=icon2.gif><TT><B> int  height</B></TT>
 
151
<DD> the height of the rectangle
 
152
<DL></DL><P></DL>
 
153
<hr>
 
154
 <DL><DT><B>This class has no child classes.</B></DL>
 
155
<DL></DL><P><I><A HREF="aindex.html"> alphabetic index</A></I>  <I><A HREF="HIER.html"> hierarchy of classes</A></I><P><hr>
 
156
<A HREF="http://www.zib.de/Visual/software/doc++/index.html"><IMG BORDER=0 ALIGN=RIGHT SRC=logo.gif></A>
 
157
<P Align=Center><I>this page has been generated automatically by doc++</I>
 
158
<P Align=Center><I>(c)opyright by <A HREF="http://www.zib.de/zoeckler/"> Malte  Z&ouml;ckler</A>, <A HREF="mailto:wunderling@zib.de"> Roland Wunderling </A><br>contact: <A HREF="mailto:doc++@zib.de"> doc++@zib.de</a></I>
 
159
</BODY>