~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to doc/class_ipe_bezier.html

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-12-11 21:22:35 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091211212235-5iio4nzpra64snab
Tags: 7.0.10-1
* New upstream.  Closes: #551192.
  - New build-depends: libcairo2-dev, liblua5.1-0-dev, gsfonts
  - patches/config.diff: Remove.  Upstream build system replaced.
  - Runtime lib package changed to libipe7.0.10 from libipe1c2a
  - Devel package renamed to libipe-dev (from libipe1-dev)
  - Package ipe depends on lua5.1 due to ipe-update-master.

* rules: Re-write to use dh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
 
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3
 
<title>Ipelib: IpeBezier Class Reference</title>
4
 
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
 
<link href="tabs.css" rel="stylesheet" type="text/css">
6
 
</head><body>
7
 
<!-- Generated by Doxygen 1.5.1 -->
8
 
<div class="tabs">
9
 
  <ul>
10
 
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11
 
    <li><a href="modules.html"><span>Modules</span></a></li>
12
 
    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
13
 
  </ul></div>
14
 
<div class="tabs">
15
 
  <ul>
16
 
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
17
 
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
18
 
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
19
 
  </ul></div>
20
 
<h1>IpeBezier Class Reference<br>
21
 
<small>
22
 
[<a class="el" href="group__geo.html">Ipe Geometry</a>]</small>
23
 
</h1><!-- doxytag: class="IpeBezier" -->A cubic Bezier spline.  
24
 
<a href="#_details">More...</a>
25
 
<p>
26
 
<a href="class_ipe_bezier-members.html">List of all members.</a><h2>Public Member Functions</h2>
27
 
<ul>
28
 
<li><a class="el" href="class_ipe_bezier.html#81bb69b5de624e838412557b90b33b94">IpeBezier</a> ()
29
 
<li><a class="el" href="class_ipe_bezier.html#6e84332f2589d4cec6f2490222f49483">IpeBezier</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p0, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p1, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p2, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p3)
30
 
<li><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_bezier.html#bc785d910c2fc78fd2109e8d48e43559">Point</a> (double t) const
31
 
<li>double <a class="el" href="class_ipe_bezier.html#a9029b31431b42b08d89cc85a61b5f6d">Distance</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;v, double bound)
32
 
<li>bool <a class="el" href="class_ipe_bezier.html#ed5ba315cd9ae63896fa0cfe24c0b37f">Straight</a> (double precision) const
33
 
<li>void <a class="el" href="class_ipe_bezier.html#b9780a68638b2bbfba08962a3cfde0ce">Subdivide</a> (<a class="el" href="class_ipe_bezier.html">IpeBezier</a> &amp;l, <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &amp;r) const
34
 
<li>void <a class="el" href="class_ipe_bezier.html#288cfd024c9ccce6ad9d23e84328ff2c">Approximate</a> (double precision, std::vector&lt; <a class="el" href="class_ipe_vector.html">IpeVector</a> &gt; &amp;result) const
35
 
<li><a class="el" href="class_ipe_rect.html">IpeRect</a> <a class="el" href="class_ipe_bezier.html#74b8c3bef01be934d9e6e3c7b674517d">BBox</a> () const
36
 
<li><a class="anchor" name="e18263e6b0627f88e3734bec171f16d2"></a><!-- doxytag: member="IpeBezier::Intersects" ref="e18263e6b0627f88e3734bec171f16d2" args="(const IpeLine &amp;l, IpeVector &amp;pt) const" -->
37
 
bool <b>Intersects</b> (const <a class="el" href="class_ipe_line.html">IpeLine</a> &amp;l, <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;pt) const
38
 
<li><a class="anchor" name="fb7cb5e14d3e0f2d03f7baf66d29d45f"></a><!-- doxytag: member="IpeBezier::Intersects" ref="fb7cb5e14d3e0f2d03f7baf66d29d45f" args="(const IpeSegment &amp;l, IpeVector &amp;pt) const" -->
39
 
bool <b>Intersects</b> (const <a class="el" href="class_ipe_segment.html">IpeSegment</a> &amp;l, <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;pt) const
40
 
</ul>
41
 
<h2>Static Public Member Functions</h2>
42
 
<ul>
43
 
<li>static <a class="el" href="class_ipe_bezier.html">IpeBezier</a> <a class="el" href="class_ipe_bezier.html#ff8a12de16305569bec160e165d969df">QuadBezier</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p0, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p1, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;p2)
44
 
<li>static void <a class="el" href="class_ipe_bezier.html#c58af3d3b1adeece51ca228687570d7e">Spline</a> (int n, const <a class="el" href="class_ipe_vector.html">IpeVector</a> *v, std::vector&lt; <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &gt; &amp;result)
45
 
<li>static void <a class="el" href="class_ipe_bezier.html#1f5bf9d341dc7818c02e79dab85c1754">ClosedSpline</a> (int n, const <a class="el" href="class_ipe_vector.html">IpeVector</a> *v, std::vector&lt; <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &gt; &amp;result)
46
 
</ul>
47
 
<h2>Public Attributes</h2>
48
 
<ul>
49
 
<li><a class="anchor" name="b78e85fdc7bf8e09bcd1f64ce39e6761"></a><!-- doxytag: member="IpeBezier::iV" ref="b78e85fdc7bf8e09bcd1f64ce39e6761" args="[4]" -->
50
 
<a class="el" href="class_ipe_vector.html">IpeVector</a> <b>iV</b> [4]
51
 
</ul>
52
 
<hr><a name="_details"></a><h2>Detailed Description</h2>
53
 
A cubic Bezier spline. 
54
 
<p>
55
 
<hr><h2>Constructor &amp; Destructor Documentation</h2>
56
 
<a class="anchor" name="81bb69b5de624e838412557b90b33b94"></a><!-- doxytag: member="IpeBezier::IpeBezier" ref="81bb69b5de624e838412557b90b33b94" args="()" -->
57
 
<div class="memitem">
58
 
<div class="memproto">
59
 
      <table class="memname">
60
 
        <tr>
61
 
          <td class="memname">IpeBezier::IpeBezier           </td>
62
 
          <td>(</td>
63
 
          <td class="paramname">          </td>
64
 
          <td>&nbsp;)&nbsp;</td>
65
 
          <td width="100%"><code> [inline]</code></td>
66
 
        </tr>
67
 
      </table>
68
 
</div>
69
 
<div class="memdoc">
70
 
 
71
 
<p>
72
 
Default constructor, uninitialized curve. 
73
 
<p>
74
 
 
75
 
</div>
76
 
</div><p>
77
 
<a class="anchor" name="6e84332f2589d4cec6f2490222f49483"></a><!-- doxytag: member="IpeBezier::IpeBezier" ref="6e84332f2589d4cec6f2490222f49483" args="(const IpeVector &amp;p0, const IpeVector &amp;p1, const IpeVector &amp;p2, const IpeVector &amp;p3)" -->
78
 
<div class="memitem">
79
 
<div class="memproto">
80
 
      <table class="memname">
81
 
        <tr>
82
 
          <td class="memname">IpeBezier::IpeBezier           </td>
83
 
          <td>(</td>
84
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
85
 
          <td class="paramname"> <em>p0</em>, </td>
86
 
        </tr>
87
 
        <tr>
88
 
          <td class="paramkey"></td>
89
 
          <td></td>
90
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
91
 
          <td class="paramname"> <em>p1</em>, </td>
92
 
        </tr>
93
 
        <tr>
94
 
          <td class="paramkey"></td>
95
 
          <td></td>
96
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
97
 
          <td class="paramname"> <em>p2</em>, </td>
98
 
        </tr>
99
 
        <tr>
100
 
          <td class="paramkey"></td>
101
 
          <td></td>
102
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
103
 
          <td class="paramname"> <em>p3</em></td><td>&nbsp;</td>
104
 
        </tr>
105
 
        <tr>
106
 
          <td></td>
107
 
          <td>)</td>
108
 
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
109
 
        </tr>
110
 
      </table>
111
 
</div>
112
 
<div class="memdoc">
113
 
 
114
 
<p>
115
 
Constructor with four control points. 
116
 
<p>
117
 
 
118
 
</div>
119
 
</div><p>
120
 
<hr><h2>Member Function Documentation</h2>
121
 
<a class="anchor" name="bc785d910c2fc78fd2109e8d48e43559"></a><!-- doxytag: member="IpeBezier::Point" ref="bc785d910c2fc78fd2109e8d48e43559" args="(double t) const" -->
122
 
<div class="memitem">
123
 
<div class="memproto">
124
 
      <table class="memname">
125
 
        <tr>
126
 
          <td class="memname"><a class="el" href="class_ipe_vector.html">IpeVector</a> IpeBezier::Point           </td>
127
 
          <td>(</td>
128
 
          <td class="paramtype">double&nbsp;</td>
129
 
          <td class="paramname"> <em>t</em>          </td>
130
 
          <td>&nbsp;)&nbsp;</td>
131
 
          <td width="100%"> const</td>
132
 
        </tr>
133
 
      </table>
134
 
</div>
135
 
<div class="memdoc">
136
 
 
137
 
<p>
138
 
Return point on curve with parameter <em>t</em> (from 0.0 to 1.0). 
139
 
<p>
140
 
 
141
 
</div>
142
 
</div><p>
143
 
<a class="anchor" name="a9029b31431b42b08d89cc85a61b5f6d"></a><!-- doxytag: member="IpeBezier::Distance" ref="a9029b31431b42b08d89cc85a61b5f6d" args="(const IpeVector &amp;v, double bound)" -->
144
 
<div class="memitem">
145
 
<div class="memproto">
146
 
      <table class="memname">
147
 
        <tr>
148
 
          <td class="memname">double IpeBezier::Distance           </td>
149
 
          <td>(</td>
150
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
151
 
          <td class="paramname"> <em>v</em>, </td>
152
 
        </tr>
153
 
        <tr>
154
 
          <td class="paramkey"></td>
155
 
          <td></td>
156
 
          <td class="paramtype">double&nbsp;</td>
157
 
          <td class="paramname"> <em>bound</em></td><td>&nbsp;</td>
158
 
        </tr>
159
 
        <tr>
160
 
          <td></td>
161
 
          <td>)</td>
162
 
          <td></td><td></td><td width="100%"></td>
163
 
        </tr>
164
 
      </table>
165
 
</div>
166
 
<div class="memdoc">
167
 
 
168
 
<p>
169
 
Return distance to Bezier spline. 
170
 
<p>
171
 
But may just return <em>bound</em> if actual distance is larger. 
172
 
</div>
173
 
</div><p>
174
 
<a class="anchor" name="ed5ba315cd9ae63896fa0cfe24c0b37f"></a><!-- doxytag: member="IpeBezier::Straight" ref="ed5ba315cd9ae63896fa0cfe24c0b37f" args="(double precision) const" -->
175
 
<div class="memitem">
176
 
<div class="memproto">
177
 
      <table class="memname">
178
 
        <tr>
179
 
          <td class="memname">bool IpeBezier::Straight           </td>
180
 
          <td>(</td>
181
 
          <td class="paramtype">double&nbsp;</td>
182
 
          <td class="paramname"> <em>precision</em>          </td>
183
 
          <td>&nbsp;)&nbsp;</td>
184
 
          <td width="100%"> const</td>
185
 
        </tr>
186
 
      </table>
187
 
</div>
188
 
<div class="memdoc">
189
 
 
190
 
<p>
191
 
Returns true if the Bezier curve is nearly identical to the line segment iV[0]..iV[3]. 
192
 
</div>
193
 
</div><p>
194
 
<a class="anchor" name="b9780a68638b2bbfba08962a3cfde0ce"></a><!-- doxytag: member="IpeBezier::Subdivide" ref="b9780a68638b2bbfba08962a3cfde0ce" args="(IpeBezier &amp;l, IpeBezier &amp;r) const" -->
195
 
<div class="memitem">
196
 
<div class="memproto">
197
 
      <table class="memname">
198
 
        <tr>
199
 
          <td class="memname">void IpeBezier::Subdivide           </td>
200
 
          <td>(</td>
201
 
          <td class="paramtype"><a class="el" href="class_ipe_bezier.html">IpeBezier</a> &amp;&nbsp;</td>
202
 
          <td class="paramname"> <em>l</em>, </td>
203
 
        </tr>
204
 
        <tr>
205
 
          <td class="paramkey"></td>
206
 
          <td></td>
207
 
          <td class="paramtype"><a class="el" href="class_ipe_bezier.html">IpeBezier</a> &amp;&nbsp;</td>
208
 
          <td class="paramname"> <em>r</em></td><td>&nbsp;</td>
209
 
        </tr>
210
 
        <tr>
211
 
          <td></td>
212
 
          <td>)</td>
213
 
          <td></td><td></td><td width="100%"> const</td>
214
 
        </tr>
215
 
      </table>
216
 
</div>
217
 
<div class="memdoc">
218
 
 
219
 
<p>
220
 
Subdivide this Bezier curve in the middle. 
221
 
<p>
222
 
 
223
 
</div>
224
 
</div><p>
225
 
<a class="anchor" name="288cfd024c9ccce6ad9d23e84328ff2c"></a><!-- doxytag: member="IpeBezier::Approximate" ref="288cfd024c9ccce6ad9d23e84328ff2c" args="(double precision, std::vector&lt; IpeVector &gt; &amp;result) const" -->
226
 
<div class="memitem">
227
 
<div class="memproto">
228
 
      <table class="memname">
229
 
        <tr>
230
 
          <td class="memname">void IpeBezier::Approximate           </td>
231
 
          <td>(</td>
232
 
          <td class="paramtype">double&nbsp;</td>
233
 
          <td class="paramname"> <em>precision</em>, </td>
234
 
        </tr>
235
 
        <tr>
236
 
          <td class="paramkey"></td>
237
 
          <td></td>
238
 
          <td class="paramtype">std::vector&lt; <a class="el" href="class_ipe_vector.html">IpeVector</a> &gt; &amp;&nbsp;</td>
239
 
          <td class="paramname"> <em>result</em></td><td>&nbsp;</td>
240
 
        </tr>
241
 
        <tr>
242
 
          <td></td>
243
 
          <td>)</td>
244
 
          <td></td><td></td><td width="100%"> const</td>
245
 
        </tr>
246
 
      </table>
247
 
</div>
248
 
<div class="memdoc">
249
 
 
250
 
<p>
251
 
Approximate by a polygonal chain. 
252
 
<p>
253
 
<em>result</em> must be empty when calling this. 
254
 
</div>
255
 
</div><p>
256
 
<a class="anchor" name="74b8c3bef01be934d9e6e3c7b674517d"></a><!-- doxytag: member="IpeBezier::BBox" ref="74b8c3bef01be934d9e6e3c7b674517d" args="() const" -->
257
 
<div class="memitem">
258
 
<div class="memproto">
259
 
      <table class="memname">
260
 
        <tr>
261
 
          <td class="memname"><a class="el" href="class_ipe_rect.html">IpeRect</a> IpeBezier::BBox           </td>
262
 
          <td>(</td>
263
 
          <td class="paramname">          </td>
264
 
          <td>&nbsp;)&nbsp;</td>
265
 
          <td width="100%"> const</td>
266
 
        </tr>
267
 
      </table>
268
 
</div>
269
 
<div class="memdoc">
270
 
 
271
 
<p>
272
 
Return a tight bounding box (accurate to within 0.5). 
273
 
<p>
274
 
 
275
 
</div>
276
 
</div><p>
277
 
<a class="anchor" name="ff8a12de16305569bec160e165d969df"></a><!-- doxytag: member="IpeBezier::QuadBezier" ref="ff8a12de16305569bec160e165d969df" args="(const IpeVector &amp;p0, const IpeVector &amp;p1, const IpeVector &amp;p2)" -->
278
 
<div class="memitem">
279
 
<div class="memproto">
280
 
      <table class="memname">
281
 
        <tr>
282
 
          <td class="memname"><a class="el" href="class_ipe_bezier.html">IpeBezier</a> IpeBezier::QuadBezier           </td>
283
 
          <td>(</td>
284
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
285
 
          <td class="paramname"> <em>p0</em>, </td>
286
 
        </tr>
287
 
        <tr>
288
 
          <td class="paramkey"></td>
289
 
          <td></td>
290
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
291
 
          <td class="paramname"> <em>p1</em>, </td>
292
 
        </tr>
293
 
        <tr>
294
 
          <td class="paramkey"></td>
295
 
          <td></td>
296
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> &amp;&nbsp;</td>
297
 
          <td class="paramname"> <em>p2</em></td><td>&nbsp;</td>
298
 
        </tr>
299
 
        <tr>
300
 
          <td></td>
301
 
          <td>)</td>
302
 
          <td></td><td></td><td width="100%"><code> [static]</code></td>
303
 
        </tr>
304
 
      </table>
305
 
</div>
306
 
<div class="memdoc">
307
 
 
308
 
<p>
309
 
Convert a quadratic Bezier-spline to a cubic one. 
310
 
<p>
311
 
The quadratic Bezier-spline with control points p0, p1, p2 is identical to the cubic Bezier-spline with control points q0 = p0, q1 = (2p1 + p0)/3, q2 = (2p1 + p2)/3, q3 = p2. 
312
 
</div>
313
 
</div><p>
314
 
<a class="anchor" name="c58af3d3b1adeece51ca228687570d7e"></a><!-- doxytag: member="IpeBezier::Spline" ref="c58af3d3b1adeece51ca228687570d7e" args="(int n, const IpeVector *v, std::vector&lt; IpeBezier &gt; &amp;result)" -->
315
 
<div class="memitem">
316
 
<div class="memproto">
317
 
      <table class="memname">
318
 
        <tr>
319
 
          <td class="memname">void IpeBezier::Spline           </td>
320
 
          <td>(</td>
321
 
          <td class="paramtype">int&nbsp;</td>
322
 
          <td class="paramname"> <em>n</em>, </td>
323
 
        </tr>
324
 
        <tr>
325
 
          <td class="paramkey"></td>
326
 
          <td></td>
327
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> *&nbsp;</td>
328
 
          <td class="paramname"> <em>v</em>, </td>
329
 
        </tr>
330
 
        <tr>
331
 
          <td class="paramkey"></td>
332
 
          <td></td>
333
 
          <td class="paramtype">std::vector&lt; <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &gt; &amp;&nbsp;</td>
334
 
          <td class="paramname"> <em>result</em></td><td>&nbsp;</td>
335
 
        </tr>
336
 
        <tr>
337
 
          <td></td>
338
 
          <td>)</td>
339
 
          <td></td><td></td><td width="100%"><code> [static]</code></td>
340
 
        </tr>
341
 
      </table>
342
 
</div>
343
 
<div class="memdoc">
344
 
 
345
 
<p>
346
 
Convert a uniform cubic B-spline to a series of Bezier splines. 
347
 
<p>
348
 
First and last control point are given multiplicity 3. Bezier splines are appended to <em>result</em>. 
349
 
</div>
350
 
</div><p>
351
 
<a class="anchor" name="1f5bf9d341dc7818c02e79dab85c1754"></a><!-- doxytag: member="IpeBezier::ClosedSpline" ref="1f5bf9d341dc7818c02e79dab85c1754" args="(int n, const IpeVector *v, std::vector&lt; IpeBezier &gt; &amp;result)" -->
352
 
<div class="memitem">
353
 
<div class="memproto">
354
 
      <table class="memname">
355
 
        <tr>
356
 
          <td class="memname">void IpeBezier::ClosedSpline           </td>
357
 
          <td>(</td>
358
 
          <td class="paramtype">int&nbsp;</td>
359
 
          <td class="paramname"> <em>n</em>, </td>
360
 
        </tr>
361
 
        <tr>
362
 
          <td class="paramkey"></td>
363
 
          <td></td>
364
 
          <td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> *&nbsp;</td>
365
 
          <td class="paramname"> <em>v</em>, </td>
366
 
        </tr>
367
 
        <tr>
368
 
          <td class="paramkey"></td>
369
 
          <td></td>
370
 
          <td class="paramtype">std::vector&lt; <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &gt; &amp;&nbsp;</td>
371
 
          <td class="paramname"> <em>result</em></td><td>&nbsp;</td>
372
 
        </tr>
373
 
        <tr>
374
 
          <td></td>
375
 
          <td>)</td>
376
 
          <td></td><td></td><td width="100%"><code> [static]</code></td>
377
 
        </tr>
378
 
      </table>
379
 
</div>
380
 
<div class="memdoc">
381
 
 
382
 
<p>
383
 
Convert a closed uniform cubic B-spline to a series of Bezier splines. 
384
 
<p>
385
 
Bezier splines are appended to <em>result</em>. 
386
 
</div>
387
 
</div><p>
388
 
<hr>The documentation for this class was generated from the following files:<ul>
389
 
<li>ipegeo.h<li>ipegeo.cpp</ul>
390
 
<hr>
391
 
</body></html>