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: IpePainter class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
6
<!-- Generated by Doxygen 1.3.4 -->
7
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="functions.html">Class Members</a></div>
8
<h1>IpePainter Class Reference<br>
10
[<a class="el" href="group__base.html">Ipe Base</a>]</small>
11
</h1>Interface for drawing.
12
<a href="#_details">More...</a>
14
Inherited by IpeBBoxPainter.
16
<a href="class_ipe_painter-members.html">List of all members.</a><h2>Public Member Functions</h2>
18
<li><a class="el" href="class_ipe_painter.html#a0">IpePainter</a> (const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> *style)
19
<li>virtual <a class="el" href="class_ipe_painter.html#a1">~IpePainter</a> ()
20
<li>virtual void <a class="el" href="class_ipe_painter.html#a2">Transform</a> (const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> &m)
21
<li>virtual void <a class="el" href="class_ipe_painter.html#a3">Untransform</a> (bool diret)
22
<li>virtual void <a class="el" href="class_ipe_painter.html#a4">Translate</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v)
23
<li>virtual void <a class="el" href="class_ipe_painter.html#a5">BeginPath</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v)
24
<li>virtual void <a class="el" href="class_ipe_painter.html#a6">BeginClosedPath</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v)
25
<li>virtual void <a class="el" href="class_ipe_painter.html#a7">LineTo</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v)
26
<li>virtual void <a class="el" href="class_ipe_painter.html#a8">CurveTo</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v1, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v2, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &v3)
27
<li>void <a class="el" href="class_ipe_painter.html#a9">CurveTo</a> (const <a class="el" href="class_ipe_bezier.html">IpeBezier</a> &bezier)
28
<li>virtual void <a class="el" href="class_ipe_painter.html#a10">Rect</a> (const <a class="el" href="class_ipe_rect.html">IpeRect</a> &re)
29
<li>virtual void <a class="el" href="class_ipe_painter.html#a11">EndPath</a> ()
30
<li>virtual void <a class="el" href="class_ipe_painter.html#a12">EndClosedPath</a> ()
31
<li>virtual void <a class="el" href="class_ipe_painter.html#a13">Push</a> ()
32
<li>virtual void <a class="el" href="class_ipe_painter.html#a14">Pop</a> ()
33
<li>virtual void <a class="el" href="class_ipe_painter.html#a15">DrawPath</a> ()
34
<li>virtual void <a class="el" href="class_ipe_painter.html#a16">DrawBitmap</a> (<a class="el" href="class_ipe_bitmap.html">IpeBitmap</a> bitmap)
35
<li>virtual void <a class="el" href="class_ipe_painter.html#a17">DrawText</a> (const <a class="el" href="class_ipe_text.html">IpeText</a> *text)
36
<li>void <a class="el" href="class_ipe_painter.html#a18">DrawEllipse</a> ()
37
<li>void <a class="el" href="class_ipe_painter.html#a19">DrawArc</a> (double alpha)
38
<li>void <a class="el" href="class_ipe_painter.html#a20">SetStroke</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> color)
39
<li>void <a class="el" href="class_ipe_painter.html#a21">SetFill</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> color)
40
<li>void <a class="el" href="class_ipe_painter.html#a22">SetLineWidth</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> wid)
41
<li>void <a class="el" href="class_ipe_painter.html#a23">SetDashStyle</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> dash)
42
<li>void <a class="el" href="class_ipe_painter.html#a24">SetLineCap</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> cap)
43
<li>void <a class="el" href="class_ipe_painter.html#a25">SetLineJoin</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> join)
44
<li>void <a class="el" href="class_ipe_painter.html#a26">SetWindRule</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> rule)
45
<li>void <a class="el" href="class_ipe_painter.html#a27">SetTextSize</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> size)
46
<li>void <a class="el" href="class_ipe_painter.html#a28">SetMarkSize</a> (<a class="el" href="class_ipe_attribute.html">IpeAttribute</a> size)
47
<li>void <a class="el" href="class_ipe_painter.html#a29">SetMarkShape</a> (int shape)
48
<li>const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> * <a class="el" href="class_ipe_painter.html#a30">StyleSheet</a> () const
49
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a31">Stroke</a> () const
50
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a32">Fill</a> () const
51
<li>const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & <a class="el" href="class_ipe_painter.html#a33">Matrix</a> () const
52
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a34">LineWidth</a> () const
53
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a35">DashStyle</a> () const
54
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a36">LineCap</a> () const
55
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a37">LineJoin</a> () const
56
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a38">WindRule</a> () const
57
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a39">TextSize</a> () const
58
<li><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_painter.html#a40">MarkSize</a> () const
59
<li>int <a class="el" href="class_ipe_painter.html#a41">MarkShape</a> () const
60
<li>const <a class="el" href="class_ipe_repository.html">IpeRepository</a> * <a class="el" href="class_ipe_painter.html#a42">Repository</a> () const
62
<h2>Protected Types</h2>
64
<li><a class="anchor" name="x0" doxytag="IpePainter::StateSeq" ></a>
65
typedef std::list< State > <b>StateSeq</b>
67
<h2>Protected Attributes</h2>
69
<li><a class="anchor" name="p0" doxytag="IpePainter::iState" ></a>
70
StateSeq <b>iState</b>
71
<li><a class="anchor" name="p1" doxytag="IpePainter::iStyleSheet" ></a>
72
const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> * <b>iStyleSheet</b>
74
<hr><a name="_details"></a><h2>Detailed Description</h2>
75
Interface for drawing.
77
IpePainter-derived classes are used for drawing to the screen and for generating PDF output.<p>
78
The IpePainter maintains a stack of graphics states, which includes stroke and fill color, line width, dash style, miter limit, line cap and line join, and the current transformation matrix. The IpePainter class takes care of maintaining this stack, and setting of the attributes in the current graphics state.<p>
79
Setting an attribute with a symbolic value is resolved immediately using the <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> attached to the IpePainter, so calling the <a class="el" href="class_ipe_painter.html#a31">Stroke()</a> or <a class="el" href="class_ipe_painter.html#a32">Fill()</a> methods of IpePainter will return the current absolute color.<p>
80
It's okay to set symbolic attributes that the stylesheet does not define - they are set to a default absolute value (normal, black, solid, etc.).<p>
81
Attributes must not be changed after a path has been started. (Although this does not seem to be stated explicitely in the PDF Reference, Acrobat Reader 4 complains if the dash style is set after a path has been defined.)<p>
82
Derived classes need to implement the functions for drawing paths, images, and texts.<p>
83
A null color is drawn as if it was void. Ipe objects exploit this: only group objects ever need to explicitly contain a 'void' color.<p>
84
A null dash style is drawn as solid.<p>
85
A null line width is drawn as whatever is the standard of the drawing medium.
87
<hr><h2>Constructor & Destructor Documentation</h2>
88
<a class="anchor" name="a0" doxytag="IpePainter::IpePainter" ></a><p>
89
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
92
<table cellpadding="0" cellspacing="0" border="0">
94
<td class="md" nowrap valign="top"> IpePainter::IpePainter </td>
95
<td class="md" valign="top">( </td>
96
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> * </td>
97
<td class="mdname1" valign="top" nowrap> <em>style</em> </td>
98
<td class="md" valign="top"> ) </td>
99
<td class="md" nowrap></td>
106
<table cellspacing=5 cellpadding=0 border=0>
114
Constructor takes a (cascaded) style sheet, which is not owned.
116
The initial graphics state contains null attributes and default line cap and line join. </td>
119
<a class="anchor" name="a1" doxytag="IpePainter::~IpePainter" ></a><p>
120
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
123
<table cellpadding="0" cellspacing="0" border="0">
125
<td class="md" nowrap valign="top"> IpePainter::~<a class="el" href="class_ipe_painter.html">IpePainter</a> </td>
126
<td class="md" valign="top">( </td>
127
<td class="mdname1" valign="top" nowrap> </td>
128
<td class="md" valign="top"> ) </td>
129
<td class="md" nowrap><code> [virtual]</code></td>
136
<table cellspacing=5 cellpadding=0 border=0>
149
<hr><h2>Member Function Documentation</h2>
150
<a class="anchor" name="a2" doxytag="IpePainter::Transform" ></a><p>
151
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
154
<table cellpadding="0" cellspacing="0" border="0">
156
<td class="md" nowrap valign="top"> void IpePainter::Transform </td>
157
<td class="md" valign="top">( </td>
158
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a> & </td>
159
<td class="mdname1" valign="top" nowrap> <em>m</em> </td>
160
<td class="md" valign="top"> ) </td>
161
<td class="md" nowrap><code> [virtual]</code></td>
168
<table cellspacing=5 cellpadding=0 border=0>
176
Concatenate a matrix to current transformation matrix.
181
<a class="anchor" name="a3" doxytag="IpePainter::Untransform" ></a><p>
182
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
185
<table cellpadding="0" cellspacing="0" border="0">
187
<td class="md" nowrap valign="top"> void IpePainter::Untransform </td>
188
<td class="md" valign="top">( </td>
189
<td class="md" nowrap valign="top">bool </td>
190
<td class="mdname1" valign="top" nowrap> <em>direct</em> </td>
191
<td class="md" valign="top"> ) </td>
192
<td class="md" nowrap><code> [virtual]</code></td>
199
<table cellspacing=5 cellpadding=0 border=0>
207
Reset transformation to original one, but with different origin/direction.
209
This changes the current transformation matrix to the one set before the first Push operation, but maintaining the current origin. If <em>direct</em> is <code>true</code>, then the x-direction is also kept. </td>
212
<a class="anchor" name="a4" doxytag="IpePainter::Translate" ></a><p>
213
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
216
<table cellpadding="0" cellspacing="0" border="0">
218
<td class="md" nowrap valign="top"> void IpePainter::Translate </td>
219
<td class="md" valign="top">( </td>
220
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
221
<td class="mdname1" valign="top" nowrap> <em>v</em> </td>
222
<td class="md" valign="top"> ) </td>
223
<td class="md" nowrap><code> [virtual]</code></td>
230
<table cellspacing=5 cellpadding=0 border=0>
238
Concatenate a translation to current transformation matrix.
243
<a class="anchor" name="a5" doxytag="IpePainter::BeginPath" ></a><p>
244
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
247
<table cellpadding="0" cellspacing="0" border="0">
249
<td class="md" nowrap valign="top"> void IpePainter::BeginPath </td>
250
<td class="md" valign="top">( </td>
251
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
252
<td class="mdname1" valign="top" nowrap> <em>v</em> </td>
253
<td class="md" valign="top"> ) </td>
254
<td class="md" nowrap><code> [virtual]</code></td>
261
<table cellspacing=5 cellpadding=0 border=0>
269
Start a new open path.
274
<a class="anchor" name="a6" doxytag="IpePainter::BeginClosedPath" ></a><p>
275
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
278
<table cellpadding="0" cellspacing="0" border="0">
280
<td class="md" nowrap valign="top"> void IpePainter::BeginClosedPath </td>
281
<td class="md" valign="top">( </td>
282
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
283
<td class="mdname1" valign="top" nowrap> <em>v</em> </td>
284
<td class="md" valign="top"> ) </td>
285
<td class="md" nowrap><code> [virtual]</code></td>
292
<table cellspacing=5 cellpadding=0 border=0>
300
Start a new closed path.
305
<a class="anchor" name="a7" doxytag="IpePainter::LineTo" ></a><p>
306
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
309
<table cellpadding="0" cellspacing="0" border="0">
311
<td class="md" nowrap valign="top"> void IpePainter::LineTo </td>
312
<td class="md" valign="top">( </td>
313
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
314
<td class="mdname1" valign="top" nowrap> <em>v</em> </td>
315
<td class="md" valign="top"> ) </td>
316
<td class="md" nowrap><code> [virtual]</code></td>
323
<table cellspacing=5 cellpadding=0 border=0>
331
Add line segment to path.
336
<a class="anchor" name="a8" doxytag="IpePainter::CurveTo" ></a><p>
337
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
340
<table cellpadding="0" cellspacing="0" border="0">
342
<td class="md" nowrap valign="top"> void IpePainter::CurveTo </td>
343
<td class="md" valign="top">( </td>
344
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
345
<td class="mdname" nowrap> <em>v1</em>, </td>
350
<td class="md" nowrap>const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
351
<td class="mdname" nowrap> <em>v2</em>, </td>
356
<td class="md" nowrap>const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
357
<td class="mdname" nowrap> <em>v3</em></td>
361
<td class="md">) </td>
362
<td class="md" colspan="2"><code> [virtual]</code></td>
369
<table cellspacing=5 cellpadding=0 border=0>
377
Add a Bezier segment to path.
382
<a class="anchor" name="a9" doxytag="IpePainter::CurveTo" ></a><p>
383
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
386
<table cellpadding="0" cellspacing="0" border="0">
388
<td class="md" nowrap valign="top"> void IpePainter::CurveTo </td>
389
<td class="md" valign="top">( </td>
390
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_bezier.html">IpeBezier</a> & </td>
391
<td class="mdname1" valign="top" nowrap> <em>bezier</em> </td>
392
<td class="md" valign="top"> ) </td>
393
<td class="md" nowrap><code> [inline]</code></td>
400
<table cellspacing=5 cellpadding=0 border=0>
410
Assumes current position is <code>bezier.iV</code>[0] </td>
413
<a class="anchor" name="a10" doxytag="IpePainter::Rect" ></a><p>
414
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
417
<table cellpadding="0" cellspacing="0" border="0">
419
<td class="md" nowrap valign="top"> void IpePainter::Rect </td>
420
<td class="md" valign="top">( </td>
421
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_rect.html">IpeRect</a> & </td>
422
<td class="mdname1" valign="top" nowrap> <em>re</em> </td>
423
<td class="md" valign="top"> ) </td>
424
<td class="md" nowrap><code> [virtual]</code></td>
431
<table cellspacing=5 cellpadding=0 border=0>
439
Add a rectangle to the path.
441
Has a default implementation in terms of LineTo, but derived classes can reimplement for efficiency. </td>
444
<a class="anchor" name="a11" doxytag="IpePainter::EndPath" ></a><p>
445
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
448
<table cellpadding="0" cellspacing="0" border="0">
450
<td class="md" nowrap valign="top"> void IpePainter::EndPath </td>
451
<td class="md" valign="top">( </td>
452
<td class="mdname1" valign="top" nowrap> </td>
453
<td class="md" valign="top"> ) </td>
454
<td class="md" nowrap><code> [virtual]</code></td>
461
<table cellspacing=5 cellpadding=0 border=0>
474
<a class="anchor" name="a12" doxytag="IpePainter::EndClosedPath" ></a><p>
475
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
478
<table cellpadding="0" cellspacing="0" border="0">
480
<td class="md" nowrap valign="top"> void IpePainter::EndClosedPath </td>
481
<td class="md" valign="top">( </td>
482
<td class="mdname1" valign="top" nowrap> </td>
483
<td class="md" valign="top"> ) </td>
484
<td class="md" nowrap><code> [virtual]</code></td>
491
<table cellspacing=5 cellpadding=0 border=0>
504
<a class="anchor" name="a13" doxytag="IpePainter::Push" ></a><p>
505
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
508
<table cellpadding="0" cellspacing="0" border="0">
510
<td class="md" nowrap valign="top"> void IpePainter::Push </td>
511
<td class="md" valign="top">( </td>
512
<td class="mdname1" valign="top" nowrap> </td>
513
<td class="md" valign="top"> ) </td>
514
<td class="md" nowrap><code> [virtual]</code></td>
521
<table cellspacing=5 cellpadding=0 border=0>
529
Save current graphics state.
534
<a class="anchor" name="a14" doxytag="IpePainter::Pop" ></a><p>
535
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
538
<table cellpadding="0" cellspacing="0" border="0">
540
<td class="md" nowrap valign="top"> void IpePainter::Pop </td>
541
<td class="md" valign="top">( </td>
542
<td class="mdname1" valign="top" nowrap> </td>
543
<td class="md" valign="top"> ) </td>
544
<td class="md" nowrap><code> [virtual]</code></td>
551
<table cellspacing=5 cellpadding=0 border=0>
559
Restore previous graphics state.
564
<a class="anchor" name="a15" doxytag="IpePainter::DrawPath" ></a><p>
565
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
568
<table cellpadding="0" cellspacing="0" border="0">
570
<td class="md" nowrap valign="top"> void IpePainter::DrawPath </td>
571
<td class="md" valign="top">( </td>
572
<td class="mdname1" valign="top" nowrap> </td>
573
<td class="md" valign="top"> ) </td>
574
<td class="md" nowrap><code> [virtual]</code></td>
581
<table cellspacing=5 cellpadding=0 border=0>
589
Fill and/or stroke a path (depending on color).
591
As in PDF, an "path" can consist of several components that are defined by sequences of <a class="el" href="class_ipe_painter.html#a6">BeginClosedPath()</a> and <a class="el" href="class_ipe_painter.html#a12">EndClosedPath()</a>. </td>
594
<a class="anchor" name="a16" doxytag="IpePainter::DrawBitmap" ></a><p>
595
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
598
<table cellpadding="0" cellspacing="0" border="0">
600
<td class="md" nowrap valign="top"> void IpePainter::DrawBitmap </td>
601
<td class="md" valign="top">( </td>
602
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_bitmap.html">IpeBitmap</a> </td>
603
<td class="mdname1" valign="top" nowrap> <em>bitmap</em> </td>
604
<td class="md" valign="top"> ) </td>
605
<td class="md" nowrap><code> [virtual]</code></td>
612
<table cellspacing=5 cellpadding=0 border=0>
622
Assumes the transformation matrix has been set up to map the unit square to the image area on the paper. </td>
625
<a class="anchor" name="a17" doxytag="IpePainter::DrawText" ></a><p>
626
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
629
<table cellpadding="0" cellspacing="0" border="0">
631
<td class="md" nowrap valign="top"> void IpePainter::DrawText </td>
632
<td class="md" valign="top">( </td>
633
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_text.html">IpeText</a> * </td>
634
<td class="mdname1" valign="top" nowrap> <em>text</em> </td>
635
<td class="md" valign="top"> ) </td>
636
<td class="md" nowrap><code> [virtual]</code></td>
643
<table cellspacing=5 cellpadding=0 border=0>
651
Render a text object.
653
Stroke color is already set, and the origin is the lower-left corner of the text box. </td>
656
<a class="anchor" name="a18" doxytag="IpePainter::DrawEllipse" ></a><p>
657
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
660
<table cellpadding="0" cellspacing="0" border="0">
662
<td class="md" nowrap valign="top"> void IpePainter::DrawEllipse </td>
663
<td class="md" valign="top">( </td>
664
<td class="mdname1" valign="top" nowrap> </td>
665
<td class="md" valign="top"> ) </td>
666
<td class="md" nowrap></td>
673
<table cellspacing=5 cellpadding=0 border=0>
681
Draw the unit circle.
683
PDF does not have an "arc" or "circle" primitive, so to draw an arc, circle, or ellipse, Ipe has to translate it into a sequence of Bezier curves.<p>
684
The approximation is based on the following: The unit circle arc from (1,0) to (cos a, sin a) be approximated by a Bezier spline with control points (1, 0), (1, beta) and their mirror images along the line with slope a/2, where beta = 4.0 * (1.0 - cos(a/2)) / (3 * sin(a/2))<p>
685
Ipe draws circles by drawing four Bezier curves for the quadrants, and arcs by patching together quarter circle approximations with a piece computed from the formula above.<p>
686
This does not modify the transformation matrix. The path is generated as a sequence BeginClosedPath .. CurveTo .. EndClosedPath, but is not actually drawn (DrawPath is not called). </td>
689
<a class="anchor" name="a19" doxytag="IpePainter::DrawArc" ></a><p>
690
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
693
<table cellpadding="0" cellspacing="0" border="0">
695
<td class="md" nowrap valign="top"> void IpePainter::DrawArc </td>
696
<td class="md" valign="top">( </td>
697
<td class="md" nowrap valign="top">double </td>
698
<td class="mdname1" valign="top" nowrap> <em>alpha</em> </td>
699
<td class="md" valign="top"> ) </td>
700
<td class="md" nowrap></td>
707
<table cellspacing=5 cellpadding=0 border=0>
715
Draw an arc of the unit circle of length <em>alpha</em>.
717
<em>alpha</em> is normalized to [0, 2 pi], and applied starting from the point (1,0).<p>
718
The function works by generating a sequence of Bezier splines (see DrawEllipse for details of the transformation). It only generates calls to CurveTo. It is assumed that the caller has already executed a MoveTo to the beginning of the arc at (1,0).<p>
719
This function may modify the transformation matrix. </td>
722
<a class="anchor" name="a20" doxytag="IpePainter::SetStroke" ></a><p>
723
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
726
<table cellpadding="0" cellspacing="0" border="0">
728
<td class="md" nowrap valign="top"> void IpePainter::SetStroke </td>
729
<td class="md" valign="top">( </td>
730
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
731
<td class="mdname1" valign="top" nowrap> <em>color</em> </td>
732
<td class="md" valign="top"> ) </td>
733
<td class="md" nowrap></td>
740
<table cellspacing=5 cellpadding=0 border=0>
748
Set stroke color, resolving symbolic color.
753
<a class="anchor" name="a21" doxytag="IpePainter::SetFill" ></a><p>
754
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
757
<table cellpadding="0" cellspacing="0" border="0">
759
<td class="md" nowrap valign="top"> void IpePainter::SetFill </td>
760
<td class="md" valign="top">( </td>
761
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
762
<td class="mdname1" valign="top" nowrap> <em>color</em> </td>
763
<td class="md" valign="top"> ) </td>
764
<td class="md" nowrap></td>
771
<table cellspacing=5 cellpadding=0 border=0>
779
Set fill color, resolving symbolic color.
784
<a class="anchor" name="a22" doxytag="IpePainter::SetLineWidth" ></a><p>
785
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
788
<table cellpadding="0" cellspacing="0" border="0">
790
<td class="md" nowrap valign="top"> void IpePainter::SetLineWidth </td>
791
<td class="md" valign="top">( </td>
792
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
793
<td class="mdname1" valign="top" nowrap> <em>wid</em> </td>
794
<td class="md" valign="top"> ) </td>
795
<td class="md" nowrap></td>
802
<table cellspacing=5 cellpadding=0 border=0>
810
Set line width, resolving symbolic value.
815
<a class="anchor" name="a23" doxytag="IpePainter::SetDashStyle" ></a><p>
816
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
819
<table cellpadding="0" cellspacing="0" border="0">
821
<td class="md" nowrap valign="top"> void IpePainter::SetDashStyle </td>
822
<td class="md" valign="top">( </td>
823
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
824
<td class="mdname1" valign="top" nowrap> <em>dash</em> </td>
825
<td class="md" valign="top"> ) </td>
826
<td class="md" nowrap></td>
833
<table cellspacing=5 cellpadding=0 border=0>
841
Set dash style, resolving symbolic value.
846
<a class="anchor" name="a24" doxytag="IpePainter::SetLineCap" ></a><p>
847
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
850
<table cellpadding="0" cellspacing="0" border="0">
852
<td class="md" nowrap valign="top"> void IpePainter::SetLineCap </td>
853
<td class="md" valign="top">( </td>
854
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
855
<td class="mdname1" valign="top" nowrap> <em>cap</em> </td>
856
<td class="md" valign="top"> ) </td>
857
<td class="md" nowrap></td>
864
<table cellspacing=5 cellpadding=0 border=0>
877
<a class="anchor" name="a25" doxytag="IpePainter::SetLineJoin" ></a><p>
878
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
881
<table cellpadding="0" cellspacing="0" border="0">
883
<td class="md" nowrap valign="top"> void IpePainter::SetLineJoin </td>
884
<td class="md" valign="top">( </td>
885
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
886
<td class="mdname1" valign="top" nowrap> <em>join</em> </td>
887
<td class="md" valign="top"> ) </td>
888
<td class="md" nowrap></td>
895
<table cellspacing=5 cellpadding=0 border=0>
908
<a class="anchor" name="a26" doxytag="IpePainter::SetWindRule" ></a><p>
909
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
912
<table cellpadding="0" cellspacing="0" border="0">
914
<td class="md" nowrap valign="top"> void IpePainter::SetWindRule </td>
915
<td class="md" valign="top">( </td>
916
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
917
<td class="mdname1" valign="top" nowrap> <em>rule</em> </td>
918
<td class="md" valign="top"> ) </td>
919
<td class="md" nowrap></td>
926
<table cellspacing=5 cellpadding=0 border=0>
934
Set wind rule (wind or even-odd).
939
<a class="anchor" name="a27" doxytag="IpePainter::SetTextSize" ></a><p>
940
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
943
<table cellpadding="0" cellspacing="0" border="0">
945
<td class="md" nowrap valign="top"> void IpePainter::SetTextSize </td>
946
<td class="md" valign="top">( </td>
947
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
948
<td class="mdname1" valign="top" nowrap> <em>size</em> </td>
949
<td class="md" valign="top"> ) </td>
950
<td class="md" nowrap></td>
957
<table cellspacing=5 cellpadding=0 border=0>
965
Set font size of text objects.
967
Paradoxically, this isn't actually used to render text, but for saving Ipegroup objects! Text goes through the Pdflatex interface, and the visitor that scans for text objects and writes them to the Latex source file finds the text size information itself. </td>
970
<a class="anchor" name="a28" doxytag="IpePainter::SetMarkSize" ></a><p>
971
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
974
<table cellpadding="0" cellspacing="0" border="0">
976
<td class="md" nowrap valign="top"> void IpePainter::SetMarkSize </td>
977
<td class="md" valign="top">( </td>
978
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_attribute.html">IpeAttribute</a> </td>
979
<td class="mdname1" valign="top" nowrap> <em>size</em> </td>
980
<td class="md" valign="top"> ) </td>
981
<td class="md" nowrap></td>
988
<table cellspacing=5 cellpadding=0 border=0>
996
Set size of mark objects.
1001
<a class="anchor" name="a29" doxytag="IpePainter::SetMarkShape" ></a><p>
1002
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1005
<table cellpadding="0" cellspacing="0" border="0">
1007
<td class="md" nowrap valign="top"> void IpePainter::SetMarkShape </td>
1008
<td class="md" valign="top">( </td>
1009
<td class="md" nowrap valign="top">int </td>
1010
<td class="mdname1" valign="top" nowrap> <em>shape</em> </td>
1011
<td class="md" valign="top"> ) </td>
1012
<td class="md" nowrap></td>
1019
<table cellspacing=5 cellpadding=0 border=0>
1027
Set shape of mark objects.
1032
<a class="anchor" name="a30" doxytag="IpePainter::StyleSheet" ></a><p>
1033
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1036
<table cellpadding="0" cellspacing="0" border="0">
1038
<td class="md" nowrap valign="top"> const <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a>* IpePainter::StyleSheet </td>
1039
<td class="md" valign="top">( </td>
1040
<td class="mdname1" valign="top" nowrap> </td>
1041
<td class="md" valign="top"> ) </td>
1042
<td class="md" nowrap> const<code> [inline]</code></td>
1049
<table cellspacing=5 cellpadding=0 border=0>
1062
<a class="anchor" name="a31" doxytag="IpePainter::Stroke" ></a><p>
1063
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1066
<table cellpadding="0" cellspacing="0" border="0">
1068
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::Stroke </td>
1069
<td class="md" valign="top">( </td>
1070
<td class="mdname1" valign="top" nowrap> </td>
1071
<td class="md" valign="top"> ) </td>
1072
<td class="md" nowrap> const<code> [inline]</code></td>
1079
<table cellspacing=5 cellpadding=0 border=0>
1087
Return current stroke color (always absolute).
1092
<a class="anchor" name="a32" doxytag="IpePainter::Fill" ></a><p>
1093
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1096
<table cellpadding="0" cellspacing="0" border="0">
1098
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::Fill </td>
1099
<td class="md" valign="top">( </td>
1100
<td class="mdname1" valign="top" nowrap> </td>
1101
<td class="md" valign="top"> ) </td>
1102
<td class="md" nowrap> const<code> [inline]</code></td>
1109
<table cellspacing=5 cellpadding=0 border=0>
1117
Return current fill color (always absolute).
1122
<a class="anchor" name="a33" doxytag="IpePainter::Matrix" ></a><p>
1123
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1126
<table cellpadding="0" cellspacing="0" border="0">
1128
<td class="md" nowrap valign="top"> const <a class="el" href="class_ipe_matrix.html">IpeMatrix</a>& IpePainter::Matrix </td>
1129
<td class="md" valign="top">( </td>
1130
<td class="mdname1" valign="top" nowrap> </td>
1131
<td class="md" valign="top"> ) </td>
1132
<td class="md" nowrap> const<code> [inline]</code></td>
1139
<table cellspacing=5 cellpadding=0 border=0>
1147
Return current transformation matrix.
1152
<a class="anchor" name="a34" doxytag="IpePainter::LineWidth" ></a><p>
1153
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1156
<table cellpadding="0" cellspacing="0" border="0">
1158
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::LineWidth </td>
1159
<td class="md" valign="top">( </td>
1160
<td class="mdname1" valign="top" nowrap> </td>
1161
<td class="md" valign="top"> ) </td>
1162
<td class="md" nowrap> const<code> [inline]</code></td>
1169
<table cellspacing=5 cellpadding=0 border=0>
1177
Return current line width (always absolute).
1182
<a class="anchor" name="a35" doxytag="IpePainter::DashStyle" ></a><p>
1183
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1186
<table cellpadding="0" cellspacing="0" border="0">
1188
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::DashStyle </td>
1189
<td class="md" valign="top">( </td>
1190
<td class="mdname1" valign="top" nowrap> </td>
1191
<td class="md" valign="top"> ) </td>
1192
<td class="md" nowrap> const<code> [inline]</code></td>
1199
<table cellspacing=5 cellpadding=0 border=0>
1207
Return current dash style (always absolute).
1212
<a class="anchor" name="a36" doxytag="IpePainter::LineCap" ></a><p>
1213
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1216
<table cellpadding="0" cellspacing="0" border="0">
1218
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::LineCap </td>
1219
<td class="md" valign="top">( </td>
1220
<td class="mdname1" valign="top" nowrap> </td>
1221
<td class="md" valign="top"> ) </td>
1222
<td class="md" nowrap> const<code> [inline]</code></td>
1229
<table cellspacing=5 cellpadding=0 border=0>
1237
Return current line cap.
1242
<a class="anchor" name="a37" doxytag="IpePainter::LineJoin" ></a><p>
1243
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1246
<table cellpadding="0" cellspacing="0" border="0">
1248
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::LineJoin </td>
1249
<td class="md" valign="top">( </td>
1250
<td class="mdname1" valign="top" nowrap> </td>
1251
<td class="md" valign="top"> ) </td>
1252
<td class="md" nowrap> const<code> [inline]</code></td>
1259
<table cellspacing=5 cellpadding=0 border=0>
1267
Return current line join.
1272
<a class="anchor" name="a38" doxytag="IpePainter::WindRule" ></a><p>
1273
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1276
<table cellpadding="0" cellspacing="0" border="0">
1278
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::WindRule </td>
1279
<td class="md" valign="top">( </td>
1280
<td class="mdname1" valign="top" nowrap> </td>
1281
<td class="md" valign="top"> ) </td>
1282
<td class="md" nowrap> const<code> [inline]</code></td>
1289
<table cellspacing=5 cellpadding=0 border=0>
1297
Return current wind rule.
1302
<a class="anchor" name="a39" doxytag="IpePainter::TextSize" ></a><p>
1303
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1306
<table cellpadding="0" cellspacing="0" border="0">
1308
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::TextSize </td>
1309
<td class="md" valign="top">( </td>
1310
<td class="mdname1" valign="top" nowrap> </td>
1311
<td class="md" valign="top"> ) </td>
1312
<td class="md" nowrap> const<code> [inline]</code></td>
1319
<table cellspacing=5 cellpadding=0 border=0>
1327
Return current text font size.
1332
<a class="anchor" name="a40" doxytag="IpePainter::MarkSize" ></a><p>
1333
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1336
<table cellpadding="0" cellspacing="0" border="0">
1338
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpePainter::MarkSize </td>
1339
<td class="md" valign="top">( </td>
1340
<td class="mdname1" valign="top" nowrap> </td>
1341
<td class="md" valign="top"> ) </td>
1342
<td class="md" nowrap> const<code> [inline]</code></td>
1349
<table cellspacing=5 cellpadding=0 border=0>
1357
Return current mark size.
1362
<a class="anchor" name="a41" doxytag="IpePainter::MarkShape" ></a><p>
1363
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1366
<table cellpadding="0" cellspacing="0" border="0">
1368
<td class="md" nowrap valign="top"> int IpePainter::MarkShape </td>
1369
<td class="md" valign="top">( </td>
1370
<td class="mdname1" valign="top" nowrap> </td>
1371
<td class="md" valign="top"> ) </td>
1372
<td class="md" nowrap> const<code> [inline]</code></td>
1379
<table cellspacing=5 cellpadding=0 border=0>
1387
Return current mark shape.
1392
<a class="anchor" name="a42" doxytag="IpePainter::Repository" ></a><p>
1393
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
1396
<table cellpadding="0" cellspacing="0" border="0">
1398
<td class="md" nowrap valign="top"> const <a class="el" href="class_ipe_repository.html">IpeRepository</a>* IpePainter::Repository </td>
1399
<td class="md" valign="top">( </td>
1400
<td class="mdname1" valign="top" nowrap> </td>
1401
<td class="md" valign="top"> ) </td>
1402
<td class="md" nowrap> const<code> [inline]</code></td>
1409
<table cellspacing=5 cellpadding=0 border=0>
1422
<hr>The documentation for this class was generated from the following files:<ul>
1423
<li>ipepainter.h<li>ipepainter.cpp</ul>