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: IpeAttribute Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.1 -->
10
<li><a href="index.html"><span>Main 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>
16
<li><a href="annotated.html"><span>Class List</span></a></li>
17
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
18
<li><a href="functions.html"><span>Class Members</span></a></li>
20
<h1>IpeAttribute Class Reference<br>
22
[<a class="el" href="group__attr.html">Ipe Attributes</a>]</small>
23
</h1><!-- doxytag: class="IpeAttribute" -->An attribute of an Ipe object.
24
<a href="#_details">More...</a>
26
<a href="class_ipe_attribute-members.html">List of all members.</a><h2>Public Types</h2>
28
<li>enum <a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> { <br>
29
<b>ELineWidth</b> = 0,
34
<b>EAngleSize</b>,
39
<b>EColor</b>,
44
<b>ELineJoin</b>,
50
<h2>Public Member Functions</h2>
52
<li><a class="el" href="class_ipe_attribute.html#78f56da1034e1a30469307d45b3f049d">IpeAttribute</a> ()
53
<li><a class="el" href="class_ipe_attribute.html#9fd63758c3e602d0066b270b0064caf6">IpeAttribute</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> kind, bool symbolic, int index)
54
<li><a class="el" href="class_ipe_attribute.html#23365dfbd318789f026e371af13f671f">IpeAttribute</a> (<a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> kind, <a class="el" href="class_ipe_fixed.html">IpeFixed</a> value)
55
<li>int <a class="el" href="class_ipe_attribute.html#3efcc43506c8543edfff3e668ceb999c">IsSymbolic</a> () const
56
<li><a class="el" href="class_ipe_attribute.html#696480f146805e7424c0fcab9f98f327">operator bool</a> () const
57
<li>bool <a class="el" href="class_ipe_attribute.html#3460fae240dc23a7f5819090b4e234e8">IsNull</a> () const
58
<li>bool <a class="el" href="class_ipe_attribute.html#42f536dae2d7cdb7774c354f16e5fef0">IsAbsolute</a> () const
59
<li>int <a class="el" href="class_ipe_attribute.html#cf1ff273f8416abb7c026348352320e0">IsValue</a> () const
60
<li>int <a class="el" href="class_ipe_attribute.html#290276424e339c74019dfdcbf90b092c">IsNumeric</a> () const
61
<li>bool <a class="el" href="class_ipe_attribute.html#41c15c05fa91c7ca1c19da911b4102c4">IsVoid</a> () const
62
<li>bool <a class="el" href="class_ipe_attribute.html#f71959b3ef48b801724a2ec4ffc453c6">IsNullOrVoid</a> () const
63
<li>bool <a class="el" href="class_ipe_attribute.html#70a7ffb87e6fbd4dcba2da10ea737ac0">IsSolid</a> () const
64
<li>bool <a class="el" href="class_ipe_attribute.html#183d40daa0ecd782aa0041c8d0646944">IsNullOrSolid</a> () const
65
<li>bool <a class="el" href="class_ipe_attribute.html#c6d8ae6b022f2cef0d309aba78fd597b">IsBlack</a> () const
66
<li>bool <a class="el" href="class_ipe_attribute.html#5440d73bc947a42314c8814a51d285b5">IsWhite</a> () const
67
<li>int <a class="el" href="class_ipe_attribute.html#148b0df7fad219b5ecd7664362d00484">Index</a> () const
68
<li><a class="el" href="class_ipe_fixed.html">IpeFixed</a> <a class="el" href="class_ipe_attribute.html#ca4ca8938a35c7db41fd61a32e09c0f4">Number</a> () const
69
<li><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> <a class="el" href="class_ipe_attribute.html#bb92e7d6e7246a17497a57af3b22a4e7">Kind</a> () const
70
<li>bool <a class="el" href="class_ipe_attribute.html#bcf4d466a93d7e83c4f2177f4fc883d5">operator==</a> (const <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> &rhs) const
71
<li>bool <a class="el" href="class_ipe_attribute.html#203c70dcf96ed699ddc8691a09879437">operator!=</a> (const <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> &rhs) const
73
<h2>Static Public Member Functions</h2>
75
<li>static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_attribute.html#b4b0d0c43cd13dbc334c4dc24d790b60">Void</a> ()
76
<li>static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_attribute.html#3a45d81c7c4608748b13a7ff8a2b5cbb">Solid</a> ()
77
<li>static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_attribute.html#15cfed1de464deeca23b54d80e0588e3">Black</a> ()
78
<li>static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> <a class="el" href="class_ipe_attribute.html#878e92477efd06e515c8233dcaca09f9">White</a> ()
82
<li><a class="anchor" name="aefea01833dea22412fd41eb0f9f31d6"></a><!-- doxytag: member="IpeAttribute::IpeStyleSheet" ref="aefea01833dea22412fd41eb0f9f31d6" args="" -->
83
class <a class="el" href="class_ipe_attribute.html#aefea01833dea22412fd41eb0f9f31d6">IpeStyleSheet</a>
85
<hr><a name="_details"></a><h2>Detailed Description</h2>
86
An attribute of an Ipe object.
88
An attribute is either null (i.e. not defined---it hasn't been set yet), or symbolic (a name that has to be looked up using an <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a>), or an absolute value.<p>
89
A null value is used in higher levels of the hierarchy to defer the setting of the attribute to a lower level. For example, if the pen width is set in an <a class="el" href="class_ipe_group.html">IpeGroup</a> object, all its members have this uniform pen width. To allow the members to have individual pen width, the <a class="el" href="class_ipe_group.html">IpeGroup</a> must have a null pen width.<p>
90
To make the representation more compact, Ipe objects store attribute values as an index into an <a class="el" href="class_ipe_repository.html">IpeRepository</a>. <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> encapsulates this index. Its meaning is as follows:<p>
92
<li>0 : a <b>null</b> argument, see below,</li><li>1 : the void color or line style</li><li>2 : the solid line style</li><li>3 : the black color</li><li>4 : the white color</li><li>if IsSymbolic: a symbolic name. Use <a class="el" href="class_ipe_style_sheet.html">IpeStyleSheet</a> to map to an absolute value.</li><li>if IsNumeric: an absolute, numeric value. Use <a class="el" href="class_ipe_attribute.html#ca4ca8938a35c7db41fd61a32e09c0f4">Number()</a> to return the number, in the range 0.0 to 16777.215 (with 3 digits fixed point precision).</li><li>if IsValue: an absolute value. Use <a class="el" href="class_ipe_repository.html">IpeRepository</a> to map to the absolute value.</li></ul>
94
An attribute is absolute (<a class="el" href="class_ipe_attribute.html#42f536dae2d7cdb7774c354f16e5fef0">IsAbsolute()</a> returns true) if it is neither null nor symbolic.<p>
95
Furthermore, the attribute stores the type of attribute, such as scalar (a double value), color, dash style, etc.<p>
96
Note the difference between the null color, which means that the color has not yet been defined (it is left to lower-level objects), and the "void" color, which means that the object should not be filled.<p>
97
When rendering an object, a null color is interpreted as the void color. This allows leaf objects not to specify the void color.<p>
98
Note that it is impossible for style sheets to redefine the meaning of "black" and "white". If a user needs a symbolic name that is black or white in some styles, she can always define another symbolic name, e.g. "Black" and "White".<p>
99
Note also the difference between null and "solid" (the special dash style of a solid line). It is impossible for style sheets to redefine the meaning of "solid".<p>
100
When rendering an object, a null dash style is interpreted as solid.
102
<hr><h2>Member Enumeration Documentation</h2>
103
<a class="anchor" name="47c97ef33d42815601f407fe1d9a4764"></a><!-- doxytag: member="IpeAttribute::TKind" ref="47c97ef33d42815601f407fe1d9a4764" args="" -->
104
<div class="memitem">
105
<div class="memproto">
106
<table class="memname">
108
<td class="memname">enum <a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeAttribute::TKind</a> </td>
115
The different kinds of attributes.
120
<hr><h2>Constructor & Destructor Documentation</h2>
121
<a class="anchor" name="78f56da1034e1a30469307d45b3f049d"></a><!-- doxytag: member="IpeAttribute::IpeAttribute" ref="78f56da1034e1a30469307d45b3f049d" args="()" -->
122
<div class="memitem">
123
<div class="memproto">
124
<table class="memname">
126
<td class="memname">IpeAttribute::IpeAttribute </td>
128
<td class="paramname"> </td>
129
<td> ) </td>
130
<td width="100%"><code> [inline, explicit]</code></td>
137
Default constructor creates null object.
142
<a class="anchor" name="9fd63758c3e602d0066b270b0064caf6"></a><!-- doxytag: member="IpeAttribute::IpeAttribute" ref="9fd63758c3e602d0066b270b0064caf6" args="(TKind kind, bool symbolic, int index)" -->
143
<div class="memitem">
144
<div class="memproto">
145
<table class="memname">
147
<td class="memname">IpeAttribute::IpeAttribute </td>
149
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> </td>
150
<td class="paramname"> <em>kind</em>, </td>
153
<td class="paramkey"></td>
155
<td class="paramtype">bool </td>
156
<td class="paramname"> <em>symbolic</em>, </td>
159
<td class="paramkey"></td>
161
<td class="paramtype">int </td>
162
<td class="paramname"> <em>index</em></td><td> </td>
167
<td></td><td></td><td width="100%"><code> [explicit]</code></td>
174
Create an attribute of given <em>kind</em>.
179
<a class="anchor" name="23365dfbd318789f026e371af13f671f"></a><!-- doxytag: member="IpeAttribute::IpeAttribute" ref="23365dfbd318789f026e371af13f671f" args="(TKind kind, IpeFixed value)" -->
180
<div class="memitem">
181
<div class="memproto">
182
<table class="memname">
184
<td class="memname">IpeAttribute::IpeAttribute </td>
186
<td class="paramtype"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">TKind</a> </td>
187
<td class="paramname"> <em>kind</em>, </td>
190
<td class="paramkey"></td>
192
<td class="paramtype"><a class="el" href="class_ipe_fixed.html">IpeFixed</a> </td>
193
<td class="paramname"> <em>value</em></td><td> </td>
198
<td></td><td></td><td width="100%"><code> [explicit]</code></td>
205
Create an absolute numeric attribute.
210
<hr><h2>Member Function Documentation</h2>
211
<a class="anchor" name="3efcc43506c8543edfff3e668ceb999c"></a><!-- doxytag: member="IpeAttribute::IsSymbolic" ref="3efcc43506c8543edfff3e668ceb999c" args="() const" -->
212
<div class="memitem">
213
<div class="memproto">
214
<table class="memname">
216
<td class="memname">int IpeAttribute::IsSymbolic </td>
218
<td class="paramname"> </td>
219
<td> ) </td>
220
<td width="100%"> const<code> [inline]</code></td>
232
<a class="anchor" name="696480f146805e7424c0fcab9f98f327"></a><!-- doxytag: member="IpeAttribute::operator bool" ref="696480f146805e7424c0fcab9f98f327" args="() const" -->
233
<div class="memitem">
234
<div class="memproto">
235
<table class="memname">
237
<td class="memname">IpeAttribute::operator bool </td>
239
<td class="paramname"> </td>
240
<td> ) </td>
241
<td width="100%"> const<code> [inline]</code></td>
248
In bool expressions, attribute is false iff it is null.
253
<a class="anchor" name="3460fae240dc23a7f5819090b4e234e8"></a><!-- doxytag: member="IpeAttribute::IsNull" ref="3460fae240dc23a7f5819090b4e234e8" args="() const" -->
254
<div class="memitem">
255
<div class="memproto">
256
<table class="memname">
258
<td class="memname">bool IpeAttribute::IsNull </td>
260
<td class="paramname"> </td>
261
<td> ) </td>
262
<td width="100%"> const<code> [inline]</code></td>
274
<a class="anchor" name="42f536dae2d7cdb7774c354f16e5fef0"></a><!-- doxytag: member="IpeAttribute::IsAbsolute" ref="42f536dae2d7cdb7774c354f16e5fef0" args="() const" -->
275
<div class="memitem">
276
<div class="memproto">
277
<table class="memname">
279
<td class="memname">bool IpeAttribute::IsAbsolute </td>
281
<td class="paramname"> </td>
282
<td> ) </td>
283
<td width="100%"> const<code> [inline]</code></td>
290
Is it absolute (including the special values <code>void</code>, <code>solid</code>, <code>black</code>, or <code>white</code>)?
293
<a class="anchor" name="cf1ff273f8416abb7c026348352320e0"></a><!-- doxytag: member="IpeAttribute::IsValue" ref="cf1ff273f8416abb7c026348352320e0" args="() const" -->
294
<div class="memitem">
295
<div class="memproto">
296
<table class="memname">
298
<td class="memname">int IpeAttribute::IsValue </td>
300
<td class="paramname"> </td>
301
<td> ) </td>
302
<td width="100%"> const<code> [inline]</code></td>
309
Is it an (absolute) value (either numeric or in <a class="el" href="class_ipe_repository.html">IpeRepository</a>)?
314
<a class="anchor" name="290276424e339c74019dfdcbf90b092c"></a><!-- doxytag: member="IpeAttribute::IsNumeric" ref="290276424e339c74019dfdcbf90b092c" args="() const" -->
315
<div class="memitem">
316
<div class="memproto">
317
<table class="memname">
319
<td class="memname">int IpeAttribute::IsNumeric </td>
321
<td class="paramname"> </td>
322
<td> ) </td>
323
<td width="100%"> const<code> [inline]</code></td>
330
Is it a numeric value?
335
<a class="anchor" name="41c15c05fa91c7ca1c19da911b4102c4"></a><!-- doxytag: member="IpeAttribute::IsVoid" ref="41c15c05fa91c7ca1c19da911b4102c4" args="() const" -->
336
<div class="memitem">
337
<div class="memproto">
338
<table class="memname">
340
<td class="memname">bool IpeAttribute::IsVoid </td>
342
<td class="paramname"> </td>
343
<td> ) </td>
344
<td width="100%"> const<code> [inline]</code></td>
356
<a class="anchor" name="f71959b3ef48b801724a2ec4ffc453c6"></a><!-- doxytag: member="IpeAttribute::IsNullOrVoid" ref="f71959b3ef48b801724a2ec4ffc453c6" args="() const" -->
357
<div class="memitem">
358
<div class="memproto">
359
<table class="memname">
361
<td class="memname">bool IpeAttribute::IsNullOrVoid </td>
363
<td class="paramname"> </td>
364
<td> ) </td>
365
<td width="100%"> const<code> [inline]</code></td>
372
Is it null or void (null is interpreted as void when drawing)?
377
<a class="anchor" name="70a7ffb87e6fbd4dcba2da10ea737ac0"></a><!-- doxytag: member="IpeAttribute::IsSolid" ref="70a7ffb87e6fbd4dcba2da10ea737ac0" args="() const" -->
378
<div class="memitem">
379
<div class="memproto">
380
<table class="memname">
382
<td class="memname">bool IpeAttribute::IsSolid </td>
384
<td class="paramname"> </td>
385
<td> ) </td>
386
<td width="100%"> const<code> [inline]</code></td>
398
<a class="anchor" name="183d40daa0ecd782aa0041c8d0646944"></a><!-- doxytag: member="IpeAttribute::IsNullOrSolid" ref="183d40daa0ecd782aa0041c8d0646944" args="() const" -->
399
<div class="memitem">
400
<div class="memproto">
401
<table class="memname">
403
<td class="memname">bool IpeAttribute::IsNullOrSolid </td>
405
<td class="paramname"> </td>
406
<td> ) </td>
407
<td width="100%"> const<code> [inline]</code></td>
414
Is it null or solid (null is interpreted as solid when drawing)?
419
<a class="anchor" name="c6d8ae6b022f2cef0d309aba78fd597b"></a><!-- doxytag: member="IpeAttribute::IsBlack" ref="c6d8ae6b022f2cef0d309aba78fd597b" args="() const" -->
420
<div class="memitem">
421
<div class="memproto">
422
<table class="memname">
424
<td class="memname">bool IpeAttribute::IsBlack </td>
426
<td class="paramname"> </td>
427
<td> ) </td>
428
<td width="100%"> const<code> [inline]</code></td>
440
<a class="anchor" name="5440d73bc947a42314c8814a51d285b5"></a><!-- doxytag: member="IpeAttribute::IsWhite" ref="5440d73bc947a42314c8814a51d285b5" args="() const" -->
441
<div class="memitem">
442
<div class="memproto">
443
<table class="memname">
445
<td class="memname">bool IpeAttribute::IsWhite </td>
447
<td class="paramname"> </td>
448
<td> ) </td>
449
<td width="100%"> const<code> [inline]</code></td>
461
<a class="anchor" name="148b0df7fad219b5ecd7664362d00484"></a><!-- doxytag: member="IpeAttribute::Index" ref="148b0df7fad219b5ecd7664362d00484" args="() const" -->
462
<div class="memitem">
463
<div class="memproto">
464
<table class="memname">
466
<td class="memname">int IpeAttribute::Index </td>
468
<td class="paramname"> </td>
469
<td> ) </td>
470
<td width="100%"> const<code> [inline]</code></td>
477
Return index into <a class="el" href="class_ipe_repository.html">IpeRepository</a>.
482
<a class="anchor" name="ca4ca8938a35c7db41fd61a32e09c0f4"></a><!-- doxytag: member="IpeAttribute::Number" ref="ca4ca8938a35c7db41fd61a32e09c0f4" args="() const" -->
483
<div class="memitem">
484
<div class="memproto">
485
<table class="memname">
487
<td class="memname"><a class="el" href="class_ipe_fixed.html">IpeFixed</a> IpeAttribute::Number </td>
489
<td class="paramname"> </td>
490
<td> ) </td>
491
<td width="100%"> const<code> [inline]</code></td>
498
Return value of absolute numeric argument.
503
<a class="anchor" name="bb92e7d6e7246a17497a57af3b22a4e7"></a><!-- doxytag: member="IpeAttribute::Kind" ref="bb92e7d6e7246a17497a57af3b22a4e7" args="() const" -->
504
<div class="memitem">
505
<div class="memproto">
506
<table class="memname">
508
<td class="memname"><a class="el" href="class_ipe_attribute.html#47c97ef33d42815601f407fe1d9a4764">IpeKind</a> IpeAttribute::Kind </td>
510
<td class="paramname"> </td>
511
<td> ) </td>
512
<td width="100%"> const</td>
519
Return kind of attribute.
524
<a class="anchor" name="bcf4d466a93d7e83c4f2177f4fc883d5"></a><!-- doxytag: member="IpeAttribute::operator==" ref="bcf4d466a93d7e83c4f2177f4fc883d5" args="(const IpeAttribute &rhs) const" -->
525
<div class="memitem">
526
<div class="memproto">
527
<table class="memname">
529
<td class="memname">bool IpeAttribute::operator== </td>
531
<td class="paramtype">const <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> & </td>
532
<td class="paramname"> <em>rhs</em> </td>
533
<td> ) </td>
534
<td width="100%"> const<code> [inline]</code></td>
541
Are two values equal (only compares index!).
546
<a class="anchor" name="203c70dcf96ed699ddc8691a09879437"></a><!-- doxytag: member="IpeAttribute::operator!=" ref="203c70dcf96ed699ddc8691a09879437" args="(const IpeAttribute &rhs) const" -->
547
<div class="memitem">
548
<div class="memproto">
549
<table class="memname">
551
<td class="memname">bool IpeAttribute::operator!= </td>
553
<td class="paramtype">const <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> & </td>
554
<td class="paramname"> <em>rhs</em> </td>
555
<td> ) </td>
556
<td width="100%"> const<code> [inline]</code></td>
563
Are two values different (only compares index!).
568
<a class="anchor" name="b4b0d0c43cd13dbc334c4dc24d790b60"></a><!-- doxytag: member="IpeAttribute::Void" ref="b4b0d0c43cd13dbc334c4dc24d790b60" args="()" -->
569
<div class="memitem">
570
<div class="memproto">
571
<table class="memname">
573
<td class="memname">static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeAttribute::Void </td>
575
<td class="paramname"> </td>
576
<td> ) </td>
577
<td width="100%"><code> [inline, static]</code></td>
584
Create void color or pen.
589
<a class="anchor" name="3a45d81c7c4608748b13a7ff8a2b5cbb"></a><!-- doxytag: member="IpeAttribute::Solid" ref="3a45d81c7c4608748b13a7ff8a2b5cbb" args="()" -->
590
<div class="memitem">
591
<div class="memproto">
592
<table class="memname">
594
<td class="memname">static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeAttribute::Solid </td>
596
<td class="paramname"> </td>
597
<td> ) </td>
598
<td width="100%"><code> [inline, static]</code></td>
605
Create solid dash style.
610
<a class="anchor" name="15cfed1de464deeca23b54d80e0588e3"></a><!-- doxytag: member="IpeAttribute::Black" ref="15cfed1de464deeca23b54d80e0588e3" args="()" -->
611
<div class="memitem">
612
<div class="memproto">
613
<table class="memname">
615
<td class="memname">static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeAttribute::Black </td>
617
<td class="paramname"> </td>
618
<td> ) </td>
619
<td width="100%"><code> [inline, static]</code></td>
631
<a class="anchor" name="878e92477efd06e515c8233dcaca09f9"></a><!-- doxytag: member="IpeAttribute::White" ref="878e92477efd06e515c8233dcaca09f9" args="()" -->
632
<div class="memitem">
633
<div class="memproto">
634
<table class="memname">
636
<td class="memname">static <a class="el" href="class_ipe_attribute.html">IpeAttribute</a> IpeAttribute::White </td>
638
<td class="paramname"> </td>
639
<td> ) </td>
640
<td width="100%"><code> [inline, static]</code></td>
652
<hr>The documentation for this class was generated from the following files:<ul>
653
<li>ipecolor.h<li>ipecolor.cpp</ul>