1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ipelib: IpeSnapData Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li id="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul></div>
<h1>IpeSnapData Class Reference<br>
<small>
[<a class="el" href="group__high.html">Ipe Management</a>]</small>
</h1><!-- doxytag: class="IpeSnapData" -->Performs snapping operations, and stores snapping state.
<a href="#_details">More...</a>
<p>
<a href="class_ipe_snap_data-members.html">List of all members.</a><h2>Public Types</h2>
<ul>
<li>enum <a class="el" href="class_ipe_snap_data.html#57308b5164176e725d99ee7c7324e22a">TSnapModes</a> { <br>
<b>ESnapNone</b> = 0,
<b>ESnapVtx</b> = 1,
<b>ESnapBd</b> = 2,
<b>ESnapInt</b> = 4,
<br>
<b>ESnapGrid</b> = 8,
<b>ESnapAngle</b> = 0x10,
<b>ESnapAuto</b> = 0x20
<br>
}
</ul>
<h2>Public Member Functions</h2>
<ul>
<li>bool <a class="el" href="class_ipe_snap_data.html#452d9e418e0bd251f4a7243375de8683">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
<li>bool <a class="el" href="class_ipe_snap_data.html#5078eac23906a9af29bbbf156f4a916b">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
<li>bool <a class="el" href="class_ipe_snap_data.html#4a25b02b7ab46e7d2f3810cb67d5aa3e">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
<li>bool <a class="el" href="class_ipe_snap_data.html#be30b863f13aa04f87d28e16fdf97e20">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
<li><a class="el" href="class_ipe_line.html">IpeLine</a> <a class="el" href="class_ipe_snap_data.html#0dca76aa02abc60ae3ffbad4259d1a4f">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
<li>bool <a class="el" href="class_ipe_snap_data.html#8e1326908a58bad2fffa3b3e7765419f">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)
</ul>
<h2>Public Attributes</h2>
<ul>
<li>int <a class="el" href="class_ipe_snap_data.html#849c6babe4d7726cd3e9205373d7f6bb">iSnap</a>
<li>bool <a class="el" href="class_ipe_snap_data.html#1df92d5e511ab99b64f2236e14333063">iGridVisible</a>
<li>int <a class="el" href="class_ipe_snap_data.html#a6cce7f59f3c84a8400396a6b54315e5">iGridSize</a>
<li>double <a class="el" href="class_ipe_snap_data.html#e61d2e6665f65b3189e51bee457cffdc">iAngleSize</a>
<li>int <a class="el" href="class_ipe_snap_data.html#c1d4f5c5a1580c14aec7d7e9e1d0c381">iSnapDistance</a>
<li>int <a class="el" href="class_ipe_snap_data.html#1823e254cfe5da4240776246fbe074e2">iSelectDistance</a>
<li>bool <a class="el" href="class_ipe_snap_data.html#39443c6f5a196363ccdc623a19c8694d">iWithAxes</a>
<li><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_snap_data.html#79bc59bc356063677917338bd1de63ad">iOrigin</a>
<li><a class="el" href="class_ipe_angle.html">IpeAngle</a> <a class="el" href="class_ipe_snap_data.html#2f3746bd359e4ca76729947a438d47ae">iDir</a>
</ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Performs snapping operations, and stores snapping state.
<p>
<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="57308b5164176e725d99ee7c7324e22a"></a><!-- doxytag: member="IpeSnapData::TSnapModes" ref="57308b5164176e725d99ee7c7324e22a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="class_ipe_snap_data.html#57308b5164176e725d99ee7c7324e22a">IpeSnapData::TSnapModes</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
The different snap modes as bitmasks.
<p>
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="452d9e418e0bd251f4a7243375de8683"></a><!-- doxytag: member="IpeSnapData::IntersectionSnap" ref="452d9e418e0bd251f4a7243375de8683" args="(IpeVector &pos, const IpePage *page, double snapDist) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool IpeSnapData::IntersectionSnap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
<td class="paramname"> <em>page</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"> <em>snapDist</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform intersection snapping.
<p>
</div>
</div><p>
<a class="anchor" name="5078eac23906a9af29bbbf156f4a916b"></a><!-- doxytag: member="IpeSnapData::SnapAngularIntersection" ref="5078eac23906a9af29bbbf156f4a916b" args="(IpeVector &pos, const IpeLine &l, const IpePage *page, double snapDist) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool IpeSnapData::SnapAngularIntersection </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_line.html">IpeLine</a> & </td>
<td class="paramname"> <em>l</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
<td class="paramname"> <em>page</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"> <em>snapDist</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Perform snapping to intersection of angular line and pos.
<p>
</div>
</div><p>
<a class="anchor" name="4a25b02b7ab46e7d2f3810cb67d5aa3e"></a><!-- doxytag: member="IpeSnapData::SimpleSnap" ref="4a25b02b7ab46e7d2f3810cb67d5aa3e" args="(IpeVector &pos, const IpePage *page, double snapDist) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool IpeSnapData::SimpleSnap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
<td class="paramname"> <em>page</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"> <em>snapDist</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Tries vertex, intersection, boundary, and grid snapping.
<p>
If snapping occurred, <em>pos</em> is set to the new user space position.
</div>
</div><p>
<a class="anchor" name="be30b863f13aa04f87d28e16fdf97e20"></a><!-- doxytag: member="IpeSnapData::Snap" ref="be30b863f13aa04f87d28e16fdf97e20" args="(IpeVector &pos, const IpePage *page, double snapDist, IpeVector *autoOrg=0) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool IpeSnapData::Snap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
<td class="paramname"> <em>page</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"> <em>snapDist</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="class_ipe_vector.html">IpeVector</a> * </td>
<td class="paramname"> <em>autoOrg</em> = <code>0</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Performs snapping of position <em>pos</em>.
<p>
Returns <code>true</code> if snapping occurred. In that case <em>pos</em> is set to the new user space position.<p>
Automatic angular snapping occurs if <em>autoOrg</em> is not null --- the value is then used as the origin for automatic angular snapping.
</div>
</div><p>
<a class="anchor" name="0dca76aa02abc60ae3ffbad4259d1a4f"></a><!-- doxytag: member="IpeSnapData::GetLine" ref="0dca76aa02abc60ae3ffbad4259d1a4f" args="(const IpeVector &mouse, const IpeVector &base) const" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_line.html">IpeLine</a> IpeSnapData::GetLine </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>mouse</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>base</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Find line through <em>base</em> with slope determined by angular snap size and direction.
</div>
</div><p>
<a class="anchor" name="8e1326908a58bad2fffa3b3e7765419f"></a><!-- doxytag: member="IpeSnapData::SetEdge" ref="8e1326908a58bad2fffa3b3e7765419f" args="(const IpeVector &pos, const IpePage *page)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool IpeSnapData::SetEdge </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_ipe_vector.html">IpeVector</a> & </td>
<td class="paramname"> <em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="class_ipe_page.html">IpePage</a> * </td>
<td class="paramname"> <em>page</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set axis origin and direction from edge near mouse.
<p>
Returns <code>true</code> if successful.
</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="849c6babe4d7726cd3e9205373d7f6bb"></a><!-- doxytag: member="IpeSnapData::iSnap" ref="849c6babe4d7726cd3e9205373d7f6bb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_ipe_snap_data.html#849c6babe4d7726cd3e9205373d7f6bb">IpeSnapData::iSnap</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Activated snapping modes (TSnapModes).
<p>
</div>
</div><p>
<a class="anchor" name="1df92d5e511ab99b64f2236e14333063"></a><!-- doxytag: member="IpeSnapData::iGridVisible" ref="1df92d5e511ab99b64f2236e14333063" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="class_ipe_snap_data.html#1df92d5e511ab99b64f2236e14333063">IpeSnapData::iGridVisible</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Is the grid visible?
<p>
</div>
</div><p>
<a class="anchor" name="a6cce7f59f3c84a8400396a6b54315e5"></a><!-- doxytag: member="IpeSnapData::iGridSize" ref="a6cce7f59f3c84a8400396a6b54315e5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_ipe_snap_data.html#a6cce7f59f3c84a8400396a6b54315e5">IpeSnapData::iGridSize</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Snap grid spacing.
<p>
</div>
</div><p>
<a class="anchor" name="e61d2e6665f65b3189e51bee457cffdc"></a><!-- doxytag: member="IpeSnapData::iAngleSize" ref="e61d2e6665f65b3189e51bee457cffdc" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double <a class="el" href="class_ipe_snap_data.html#e61d2e6665f65b3189e51bee457cffdc">IpeSnapData::iAngleSize</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Angle for angular snapping.
<p>
</div>
</div><p>
<a class="anchor" name="c1d4f5c5a1580c14aec7d7e9e1d0c381"></a><!-- doxytag: member="IpeSnapData::iSnapDistance" ref="c1d4f5c5a1580c14aec7d7e9e1d0c381" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_ipe_snap_data.html#c1d4f5c5a1580c14aec7d7e9e1d0c381">IpeSnapData::iSnapDistance</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Snap distance (in pixels).
<p>
</div>
</div><p>
<a class="anchor" name="1823e254cfe5da4240776246fbe074e2"></a><!-- doxytag: member="IpeSnapData::iSelectDistance" ref="1823e254cfe5da4240776246fbe074e2" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int <a class="el" href="class_ipe_snap_data.html#1823e254cfe5da4240776246fbe074e2">IpeSnapData::iSelectDistance</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Select distance (in pixels).
<p>
</div>
</div><p>
<a class="anchor" name="39443c6f5a196363ccdc623a19c8694d"></a><!-- doxytag: member="IpeSnapData::iWithAxes" ref="39443c6f5a196363ccdc623a19c8694d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="class_ipe_snap_data.html#39443c6f5a196363ccdc623a19c8694d">IpeSnapData::iWithAxes</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Show coordinate system?
<p>
</div>
</div><p>
<a class="anchor" name="79bc59bc356063677917338bd1de63ad"></a><!-- doxytag: member="IpeSnapData::iOrigin" ref="79bc59bc356063677917338bd1de63ad" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_vector.html">IpeVector</a> <a class="el" href="class_ipe_snap_data.html#79bc59bc356063677917338bd1de63ad">IpeSnapData::iOrigin</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Origin of coordinate system.
<p>
</div>
</div><p>
<a class="anchor" name="2f3746bd359e4ca76729947a438d47ae"></a><!-- doxytag: member="IpeSnapData::iDir" ref="2f3746bd359e4ca76729947a438d47ae" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_ipe_angle.html">IpeAngle</a> <a class="el" href="class_ipe_snap_data.html#2f3746bd359e4ca76729947a438d47ae">IpeSnapData::iDir</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Direction of x-axis.
<p>
</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>ipesnap.h<li>ipesnap.cpp</ul>
<hr>
</body></html>
|