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: IpeSnapData 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>IpeSnapData Class Reference<br>
10
[<a class="el" href="group__high.html">Ipe Management</a>]</small>
11
</h1>Performs snapping operations, and stores snapping state.
12
<a href="#_details">More...</a>
14
<a href="class_ipe_snap_data-members.html">List of all members.</a><h2>Public Types</h2>
16
<li>enum <a class="el" href="class_ipe_snap_data.html#w7">TSnapModes</a> { <br>
17
<b>ESnapNone</b> = 0,
22
<b>ESnapGrid</b> = 8,
23
<b>ESnapAngle</b> = 0x10,
24
<b>ESnapAuto</b> = 0x20
28
<h2>Public Member Functions</h2>
30
<li>bool <a class="el" href="class_ipe_snap_data.html#a0">IntersectionSnap</a> (<a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, const <a class="el" href="class_ipe_page.html">IpePage</a> *page, double snapDist) const
31
<li>bool <a class="el" href="class_ipe_snap_data.html#a1">SnapAngularIntersection</a> (<a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, const <a class="el" href="class_ipe_line.html">IpeLine</a> &l, const <a class="el" href="class_ipe_page.html">IpePage</a> *page, double snapDist) const
32
<li>bool <a class="el" href="class_ipe_snap_data.html#a2">SimpleSnap</a> (<a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, const <a class="el" href="class_ipe_page.html">IpePage</a> *page, double snapDist) const
33
<li>bool <a class="el" href="class_ipe_snap_data.html#a3">Snap</a> (<a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, const <a class="el" href="class_ipe_page.html">IpePage</a> *page, double snapDist, <a class="el" href="class_ipe_vector.html">IpeVector</a> *autoOrg=0) const
34
<li><a class="el" href="class_ipe_line.html">IpeLine</a> <a class="el" href="class_ipe_snap_data.html#a4">GetLine</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &mouse, const <a class="el" href="class_ipe_vector.html">IpeVector</a> &base) const
35
<li>bool <a class="el" href="class_ipe_snap_data.html#a5">SetEdge</a> (const <a class="el" href="class_ipe_vector.html">IpeVector</a> &pos, const <a class="el" href="class_ipe_page.html">IpePage</a> *page)
37
<h2>Public Attributes</h2>
39
<li>int <a class="el" href="class_ipe_snap_data.html#o0">iSnap</a>
40
<li>bool <a class="el" href="class_ipe_snap_data.html#o1">iGridVisible</a>
41
<li>double <a class="el" href="class_ipe_snap_data.html#o2">iGridSize</a>
42
<li>double <a class="el" href="class_ipe_snap_data.html#o3">iAngleSize</a>
43
<li>int <a class="el" href="class_ipe_snap_data.html#o4">iSnapDistance</a>
44
<li>int <a class="el" href="class_ipe_snap_data.html#o5">iSelectDistance</a>
45
<li>bool <a class="el" href="class_ipe_snap_data.html#o6">iWithAxes</a>
46
<li><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_snap_data.html#o7">iOrigin</a>
47
<li><a class="el" href="class_ipe_angle.html">IpeAngle</a> <a class="el" href="class_ipe_snap_data.html#o8">iDir</a>
48
<li>int <a class="el" href="class_ipe_snap_data.html#o9">iView</a>
50
<hr><a name="_details"></a><h2>Detailed Description</h2>
51
Performs snapping operations, and stores snapping state.
53
<hr><h2>Member Enumeration Documentation</h2>
54
<a class="anchor" name="w7" doxytag="IpeSnapData::TSnapModes" ></a><p>
55
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
58
<table cellpadding="0" cellspacing="0" border="0">
60
<td class="md" nowrap valign="top"> enum <a class="el" href="class_ipe_snap_data.html#w7">IpeSnapData::TSnapModes</a>
65
<table cellspacing=5 cellpadding=0 border=0>
73
The different snap modes as bitmasks.
78
<hr><h2>Member Function Documentation</h2>
79
<a class="anchor" name="a0" doxytag="IpeSnapData::IntersectionSnap" ></a><p>
80
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
83
<table cellpadding="0" cellspacing="0" border="0">
85
<td class="md" nowrap valign="top"> bool IpeSnapData::IntersectionSnap </td>
86
<td class="md" valign="top">( </td>
87
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
88
<td class="mdname" nowrap> <em>pos</em>, </td>
93
<td class="md" nowrap>const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
94
<td class="mdname" nowrap> <em>page</em>, </td>
99
<td class="md" nowrap>double </td>
100
<td class="mdname" nowrap> <em>snapDist</em></td>
104
<td class="md">) </td>
105
<td class="md" colspan="2"> const</td>
112
<table cellspacing=5 cellpadding=0 border=0>
120
Perform intersection snapping.
125
<a class="anchor" name="a1" doxytag="IpeSnapData::SnapAngularIntersection" ></a><p>
126
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
129
<table cellpadding="0" cellspacing="0" border="0">
131
<td class="md" nowrap valign="top"> bool IpeSnapData::SnapAngularIntersection </td>
132
<td class="md" valign="top">( </td>
133
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
134
<td class="mdname" nowrap> <em>pos</em>, </td>
139
<td class="md" nowrap>const <a class="el" href="class_ipe_line.html">IpeLine</a> & </td>
140
<td class="mdname" nowrap> <em>l</em>, </td>
145
<td class="md" nowrap>const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
146
<td class="mdname" nowrap> <em>page</em>, </td>
151
<td class="md" nowrap>double </td>
152
<td class="mdname" nowrap> <em>snapDist</em></td>
156
<td class="md">) </td>
157
<td class="md" colspan="2"> const</td>
164
<table cellspacing=5 cellpadding=0 border=0>
172
Perform snapping to intersection of angular line and pos.
177
<a class="anchor" name="a2" doxytag="IpeSnapData::SimpleSnap" ></a><p>
178
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
181
<table cellpadding="0" cellspacing="0" border="0">
183
<td class="md" nowrap valign="top"> bool IpeSnapData::SimpleSnap </td>
184
<td class="md" valign="top">( </td>
185
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
186
<td class="mdname" nowrap> <em>pos</em>, </td>
191
<td class="md" nowrap>const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
192
<td class="mdname" nowrap> <em>page</em>, </td>
197
<td class="md" nowrap>double </td>
198
<td class="mdname" nowrap> <em>snapDist</em></td>
202
<td class="md">) </td>
203
<td class="md" colspan="2"> const</td>
210
<table cellspacing=5 cellpadding=0 border=0>
218
Tries vertex, intersection, boundary, and grid snapping.
220
If snapping occurred, <em>pos</em> is set to the new user space position. </td>
223
<a class="anchor" name="a3" doxytag="IpeSnapData::Snap" ></a><p>
224
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
227
<table cellpadding="0" cellspacing="0" border="0">
229
<td class="md" nowrap valign="top"> bool IpeSnapData::Snap </td>
230
<td class="md" valign="top">( </td>
231
<td class="md" nowrap valign="top"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
232
<td class="mdname" nowrap> <em>pos</em>, </td>
237
<td class="md" nowrap>const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
238
<td class="mdname" nowrap> <em>page</em>, </td>
243
<td class="md" nowrap>double </td>
244
<td class="mdname" nowrap> <em>snapDist</em>, </td>
249
<td class="md" nowrap><a class="el" href="class_ipe_vector.html">IpeVector</a> * </td>
250
<td class="mdname" nowrap> <em>autoOrg</em> = 0</td>
254
<td class="md">) </td>
255
<td class="md" colspan="2"> const</td>
262
<table cellspacing=5 cellpadding=0 border=0>
270
Performs snapping of position <em>pos</em>.
272
Returns <code>true</code> if snapping occurred. In that case <em>pos</em> is set to the new user space position.<p>
273
Automatic angular snapping occurs if <em>autoOrg</em> is not null --- the value is then used as the origin for automatic angular snapping. </td>
276
<a class="anchor" name="a4" doxytag="IpeSnapData::GetLine" ></a><p>
277
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
280
<table cellpadding="0" cellspacing="0" border="0">
282
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_line.html">IpeLine</a> IpeSnapData::GetLine </td>
283
<td class="md" valign="top">( </td>
284
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
285
<td class="mdname" nowrap> <em>mouse</em>, </td>
290
<td class="md" nowrap>const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
291
<td class="mdname" nowrap> <em>base</em></td>
295
<td class="md">) </td>
296
<td class="md" colspan="2"> const</td>
303
<table cellspacing=5 cellpadding=0 border=0>
311
Find line through <em>base</em> with slope determined by angular snap size and direction. </td>
314
<a class="anchor" name="a5" doxytag="IpeSnapData::SetEdge" ></a><p>
315
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
318
<table cellpadding="0" cellspacing="0" border="0">
320
<td class="md" nowrap valign="top"> bool IpeSnapData::SetEdge </td>
321
<td class="md" valign="top">( </td>
322
<td class="md" nowrap valign="top">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
323
<td class="mdname" nowrap> <em>pos</em>, </td>
328
<td class="md" nowrap>const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
329
<td class="mdname" nowrap> <em>page</em></td>
333
<td class="md">) </td>
334
<td class="md" colspan="2"></td>
341
<table cellspacing=5 cellpadding=0 border=0>
349
Set axis origin and direction from edge near mouse.
351
Returns <code>true</code> if successful. </td>
354
<hr><h2>Member Data Documentation</h2>
355
<a class="anchor" name="o0" doxytag="IpeSnapData::iSnap" ></a><p>
356
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
359
<table cellpadding="0" cellspacing="0" border="0">
361
<td class="md" nowrap valign="top"> int <a class="el" href="class_ipe_snap_data.html#o0">IpeSnapData::iSnap</a>
366
<table cellspacing=5 cellpadding=0 border=0>
374
Activated snapping modes (TSnapModes).
379
<a class="anchor" name="o1" doxytag="IpeSnapData::iGridVisible" ></a><p>
380
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
383
<table cellpadding="0" cellspacing="0" border="0">
385
<td class="md" nowrap valign="top"> bool <a class="el" href="class_ipe_snap_data.html#o1">IpeSnapData::iGridVisible</a>
390
<table cellspacing=5 cellpadding=0 border=0>
403
<a class="anchor" name="o2" doxytag="IpeSnapData::iGridSize" ></a><p>
404
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
407
<table cellpadding="0" cellspacing="0" border="0">
409
<td class="md" nowrap valign="top"> double <a class="el" href="class_ipe_snap_data.html#o2">IpeSnapData::iGridSize</a>
414
<table cellspacing=5 cellpadding=0 border=0>
427
<a class="anchor" name="o3" doxytag="IpeSnapData::iAngleSize" ></a><p>
428
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
431
<table cellpadding="0" cellspacing="0" border="0">
433
<td class="md" nowrap valign="top"> double <a class="el" href="class_ipe_snap_data.html#o3">IpeSnapData::iAngleSize</a>
438
<table cellspacing=5 cellpadding=0 border=0>
446
Angle for angular snapping.
451
<a class="anchor" name="o4" doxytag="IpeSnapData::iSnapDistance" ></a><p>
452
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
455
<table cellpadding="0" cellspacing="0" border="0">
457
<td class="md" nowrap valign="top"> int <a class="el" href="class_ipe_snap_data.html#o4">IpeSnapData::iSnapDistance</a>
462
<table cellspacing=5 cellpadding=0 border=0>
470
Snap distance (in pixels).
475
<a class="anchor" name="o5" doxytag="IpeSnapData::iSelectDistance" ></a><p>
476
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
479
<table cellpadding="0" cellspacing="0" border="0">
481
<td class="md" nowrap valign="top"> int <a class="el" href="class_ipe_snap_data.html#o5">IpeSnapData::iSelectDistance</a>
486
<table cellspacing=5 cellpadding=0 border=0>
494
Select distance (in pixels).
499
<a class="anchor" name="o6" doxytag="IpeSnapData::iWithAxes" ></a><p>
500
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
503
<table cellpadding="0" cellspacing="0" border="0">
505
<td class="md" nowrap valign="top"> bool <a class="el" href="class_ipe_snap_data.html#o6">IpeSnapData::iWithAxes</a>
510
<table cellspacing=5 cellpadding=0 border=0>
518
Show coordinate system?
523
<a class="anchor" name="o7" doxytag="IpeSnapData::iOrigin" ></a><p>
524
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
527
<table cellpadding="0" cellspacing="0" border="0">
529
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_snap_data.html#o7">IpeSnapData::iOrigin</a>
534
<table cellspacing=5 cellpadding=0 border=0>
542
Origin of coordinate system.
547
<a class="anchor" name="o8" doxytag="IpeSnapData::iDir" ></a><p>
548
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
551
<table cellpadding="0" cellspacing="0" border="0">
553
<td class="md" nowrap valign="top"> <a class="el" href="class_ipe_angle.html">IpeAngle</a> <a class="el" href="class_ipe_snap_data.html#o8">IpeSnapData::iDir</a>
558
<table cellspacing=5 cellpadding=0 border=0>
566
Direction of x-axis </td>
569
<a class="anchor" name="o9" doxytag="IpeSnapData::iView" ></a><p>
570
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
573
<table cellpadding="0" cellspacing="0" border="0">
575
<td class="md" nowrap valign="top"> int <a class="el" href="class_ipe_snap_data.html#o9">IpeSnapData::iView</a>
580
<table cellspacing=5 cellpadding=0 border=0>
588
Current view of the page (restricts usable layers).
590
if negative, no view restriction. </td>
593
<hr>The documentation for this class was generated from the following files:<ul>
594
<li>ipesnap.h<li>ipesnap.cpp</ul>