/usr/share/doc/libgnomecanvas2-doc/html/libgnomecanvas-gnome-canvas-util.html is in libgnomecanvas2-doc 2.30.3-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gnome-canvas-util</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GNOME Canvas Library Reference Manual">
<link rel="up" href="ch02.html" title="GNOME Canvas Library (libgnomecanvas)">
<link rel="prev" href="libgnomecanvas-gnome-canvas-path-def.html" title="gnome-canvas-path-def">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libgnomecanvas-gnome-canvas-path-def.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Canvas Library Reference Manual</th>
<td> </td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgnomecanvas-gnome-canvas-util.synopsis" class="shortcut">Top</a>
|
<a href="#libgnomecanvas-gnome-canvas-util.description" class="shortcut">Description</a>
|
<a href="#libgnomecanvas-gnome-canvas-util.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgnomecanvas-gnome-canvas-util"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgnomecanvas-gnome-canvas-util.top_of_page"></a>gnome-canvas-util</span></h2>
<p>gnome-canvas-util</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgnomecanvas-gnome-canvas-util.synopsis"></a><h2>Synopsis</h2>
<a name="GnomeCanvasPoints"></a><pre class="synopsis">
#include <libgnomecanvas/libgnomecanvas.h>
struct <a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints-struct" title="struct GnomeCanvasPoints">GnomeCanvasPoints</a>;
<a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="returnvalue">GnomeCanvasPoints</span></a> * <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-points-new" title="gnome_canvas_points_new ()">gnome_canvas_points_new</a> (<em class="parameter"><code><span class="type">int</span> num_points</code></em>);
<a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="returnvalue">GnomeCanvasPoints</span></a> * <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-points-ref" title="gnome_canvas_points_ref ()">gnome_canvas_points_ref</a> (<em class="parameter"><code><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="type">GnomeCanvasPoints</span></a> *points</code></em>);
#define <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-points-unref" title="gnome_canvas_points_unref">gnome_canvas_points_unref</a>
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-points-free" title="gnome_canvas_points_free ()">gnome_canvas_points_free</a> (<em class="parameter"><code><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="type">GnomeCanvasPoints</span></a> *points</code></em>);
<span class="returnvalue">int</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-get-miter-points" title="gnome_canvas_get_miter_points ()">gnome_canvas_get_miter_points</a> (<em class="parameter"><code><span class="type">double</span> x1</code></em>,
<em class="parameter"><code><span class="type">double</span> y1</code></em>,
<em class="parameter"><code><span class="type">double</span> x2</code></em>,
<em class="parameter"><code><span class="type">double</span> y2</code></em>,
<em class="parameter"><code><span class="type">double</span> x3</code></em>,
<em class="parameter"><code><span class="type">double</span> y3</code></em>,
<em class="parameter"><code><span class="type">double</span> width</code></em>,
<em class="parameter"><code><span class="type">double</span> *mx1</code></em>,
<em class="parameter"><code><span class="type">double</span> *my1</code></em>,
<em class="parameter"><code><span class="type">double</span> *mx2</code></em>,
<em class="parameter"><code><span class="type">double</span> *my2</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-get-butt-points" title="gnome_canvas_get_butt_points ()">gnome_canvas_get_butt_points</a> (<em class="parameter"><code><span class="type">double</span> x1</code></em>,
<em class="parameter"><code><span class="type">double</span> y1</code></em>,
<em class="parameter"><code><span class="type">double</span> x2</code></em>,
<em class="parameter"><code><span class="type">double</span> y2</code></em>,
<em class="parameter"><code><span class="type">double</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> project</code></em>,
<em class="parameter"><code><span class="type">double</span> *bx1</code></em>,
<em class="parameter"><code><span class="type">double</span> *by1</code></em>,
<em class="parameter"><code><span class="type">double</span> *bx2</code></em>,
<em class="parameter"><code><span class="type">double</span> *by2</code></em>);
<span class="returnvalue">double</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-polygon-to-point" title="gnome_canvas_polygon_to_point ()">gnome_canvas_polygon_to_point</a> (<em class="parameter"><code><span class="type">double</span> *poly</code></em>,
<em class="parameter"><code><span class="type">int</span> num_points</code></em>,
<em class="parameter"><code><span class="type">double</span> x</code></em>,
<em class="parameter"><code><span class="type">double</span> y</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-render-svp" title="gnome_canvas_render_svp ()">gnome_canvas_render_svp</a> (<em class="parameter"><code><a class="link" href="GnomeCanvas.html#GnomeCanvasBuf" title="GnomeCanvasBuf"><span class="type">GnomeCanvasBuf</span></a> *buf</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *svp</code></em>,
<em class="parameter"><code><span class="type">guint32</span> rgba</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-update-svp" title="gnome_canvas_update_svp ()">gnome_canvas_update_svp</a> (<em class="parameter"><code><a class="link" href="GnomeCanvas.html" title="GnomeCanvas"><span class="type">GnomeCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-update-svp-clip" title="gnome_canvas_update_svp_clip ()">gnome_canvas_update_svp_clip</a> (<em class="parameter"><code><a class="link" href="GnomeCanvas.html" title="GnomeCanvas"><span class="type">GnomeCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *clip_svp</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-item-reset-bounds" title="gnome_canvas_item_reset_bounds ()">gnome_canvas_item_reset_bounds</a> (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-item-update-svp" title="gnome_canvas_item_update_svp ()">gnome_canvas_item_update_svp</a> (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-item-update-svp-clip" title="gnome_canvas_item_update_svp_clip ()">gnome_canvas_item_update_svp_clip</a> (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *clip_svp</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-item-request-redraw-svp" title="gnome_canvas_item_request_redraw_svp ()">gnome_canvas_item_request_redraw_svp</a>
(<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code>const <span class="type">ArtSVP</span> *svp</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-update-bbox" title="gnome_canvas_update_bbox ()">gnome_canvas_update_bbox</a> (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">int</span> x1</code></em>,
<em class="parameter"><code><span class="type">int</span> y1</code></em>,
<em class="parameter"><code><span class="type">int</span> x2</code></em>,
<em class="parameter"><code><span class="type">int</span> y2</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-buf-ensure-buf" title="gnome_canvas_buf_ensure_buf ()">gnome_canvas_buf_ensure_buf</a> (<em class="parameter"><code><a class="link" href="GnomeCanvas.html#GnomeCanvasBuf" title="GnomeCanvasBuf"><span class="type">GnomeCanvasBuf</span></a> *buf</code></em>);
<span class="returnvalue">ArtPathStrokeJoinType</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-join-gdk-to-art" title="gnome_canvas_join_gdk_to_art ()">gnome_canvas_join_gdk_to_art</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkJoinStyle"><span class="type">GdkJoinStyle</span></a> gdk_join</code></em>);
<span class="returnvalue">ArtPathStrokeCapType</span> <a class="link" href="libgnomecanvas-gnome-canvas-util.html#gnome-canvas-cap-gdk-to-art" title="gnome_canvas_cap_gdk_to_art ()">gnome_canvas_cap_gdk_to_art</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkCapStyle"><span class="type">GdkCapStyle</span></a> gdk_cap</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgnomecanvas-gnome-canvas-util.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GBoxed
+----GnomeCanvasPoints
</pre>
</div>
<div class="refsect1">
<a name="libgnomecanvas-gnome-canvas-util.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="libgnomecanvas-gnome-canvas-util.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GnomeCanvasPoints-struct"></a><h3>struct GnomeCanvasPoints</h3>
<pre class="programlisting">struct GnomeCanvasPoints {
double *coords;
int num_points;
int ref_count;
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-points-new"></a><h3>gnome_canvas_points_new ()</h3>
<pre class="programlisting"><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="returnvalue">GnomeCanvasPoints</span></a> * gnome_canvas_points_new (<em class="parameter"><code><span class="type">int</span> num_points</code></em>);</pre>
<p>
Creates a structure that should be used to pass an array of points to
items.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_points</code></em> :</span></p></td>
<td>The number of points to allocate space for in the array.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly-created array of points. It should be filled in
by the user.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-points-ref"></a><h3>gnome_canvas_points_ref ()</h3>
<pre class="programlisting"><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="returnvalue">GnomeCanvasPoints</span></a> * gnome_canvas_points_ref (<em class="parameter"><code><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="type">GnomeCanvasPoints</span></a> *points</code></em>);</pre>
<p>
Increases the reference count of the specified points structure.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>points</code></em> :</span></p></td>
<td>A canvas points structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The canvas points structure itself.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-points-unref"></a><h3>gnome_canvas_points_unref</h3>
<pre class="programlisting">#define gnome_canvas_points_unref</pre>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-points-free"></a><h3>gnome_canvas_points_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_points_free (<em class="parameter"><code><a class="link" href="libgnomecanvas-gnome-canvas-util.html#GnomeCanvasPoints"><span class="type">GnomeCanvasPoints</span></a> *points</code></em>);</pre>
<p>
Decreases the reference count of the specified points structure. If it
reaches zero, then the structure is freed.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>points</code></em> :</span></p></td>
<td>A canvas points structure.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-get-miter-points"></a><h3>gnome_canvas_get_miter_points ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> gnome_canvas_get_miter_points (<em class="parameter"><code><span class="type">double</span> x1</code></em>,
<em class="parameter"><code><span class="type">double</span> y1</code></em>,
<em class="parameter"><code><span class="type">double</span> x2</code></em>,
<em class="parameter"><code><span class="type">double</span> y2</code></em>,
<em class="parameter"><code><span class="type">double</span> x3</code></em>,
<em class="parameter"><code><span class="type">double</span> y3</code></em>,
<em class="parameter"><code><span class="type">double</span> width</code></em>,
<em class="parameter"><code><span class="type">double</span> *mx1</code></em>,
<em class="parameter"><code><span class="type">double</span> *my1</code></em>,
<em class="parameter"><code><span class="type">double</span> *mx2</code></em>,
<em class="parameter"><code><span class="type">double</span> *my2</code></em>);</pre>
<p>
Given three points forming an angle, computes the coordinates of the inside
and outside points of the mitered corner formed by a line of a given width at
that angle.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>X coordinate of the first point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>Y coordinate of the first point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>X coordinate of the second (angle) point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>Y coordinate of the second (angle) point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x3</code></em> :</span></p></td>
<td>X coordinate of the third point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y3</code></em> :</span></p></td>
<td>Y coordinate of the third point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>Width of the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mx1</code></em> :</span></p></td>
<td>The X coordinate of the first miter point is returned here.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>my1</code></em> :</span></p></td>
<td>The Y coordinate of the first miter point is returned here.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mx2</code></em> :</span></p></td>
<td>The X coordinate of the second miter point is returned here.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>my2</code></em> :</span></p></td>
<td>The Y coordinate of the second miter point is returned here.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>FALSE if the angle is less than 11 degrees (this is the same
threshold as X uses. If this occurs, the return points are not modified.
Otherwise, returns TRUE.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-get-butt-points"></a><h3>gnome_canvas_get_butt_points ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_get_butt_points (<em class="parameter"><code><span class="type">double</span> x1</code></em>,
<em class="parameter"><code><span class="type">double</span> y1</code></em>,
<em class="parameter"><code><span class="type">double</span> x2</code></em>,
<em class="parameter"><code><span class="type">double</span> y2</code></em>,
<em class="parameter"><code><span class="type">double</span> width</code></em>,
<em class="parameter"><code><span class="type">int</span> project</code></em>,
<em class="parameter"><code><span class="type">double</span> *bx1</code></em>,
<em class="parameter"><code><span class="type">double</span> *by1</code></em>,
<em class="parameter"><code><span class="type">double</span> *bx2</code></em>,
<em class="parameter"><code><span class="type">double</span> *by2</code></em>);</pre>
<p>
Computes the butt points of a line segment.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>X coordinate of first point in the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>Y cooordinate of first point in the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>X coordinate of second point (endpoint) of the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>Y coordinate of second point (endpoint) of the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>Width of the line</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>project</code></em> :</span></p></td>
<td>Whether the butt points should project out by width/2 distance</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bx1</code></em> :</span></p></td>
<td>X coordinate of first butt point is returned here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>by1</code></em> :</span></p></td>
<td>Y coordinate of first butt point is returned here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bx2</code></em> :</span></p></td>
<td>X coordinate of second butt point is returned here</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>by2</code></em> :</span></p></td>
<td>Y coordinate of second butt point is returned here</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-polygon-to-point"></a><h3>gnome_canvas_polygon_to_point ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span> gnome_canvas_polygon_to_point (<em class="parameter"><code><span class="type">double</span> *poly</code></em>,
<em class="parameter"><code><span class="type">int</span> num_points</code></em>,
<em class="parameter"><code><span class="type">double</span> x</code></em>,
<em class="parameter"><code><span class="type">double</span> y</code></em>);</pre>
<p>
Computes the distance between a point and a polygon.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>poly</code></em> :</span></p></td>
<td>Vertices of the polygon. X coordinates are in the even indices, and Y
coordinates are in the odd indices</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>num_points</code></em> :</span></p></td>
<td>Number of points in the polygon</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>X coordinate of the point</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>Y coordinate of the point</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The distance from the point to the polygon, or zero if the
point is inside the polygon.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-render-svp"></a><h3>gnome_canvas_render_svp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_render_svp (<em class="parameter"><code><a class="link" href="GnomeCanvas.html#GnomeCanvasBuf" title="GnomeCanvasBuf"><span class="type">GnomeCanvasBuf</span></a> *buf</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *svp</code></em>,
<em class="parameter"><code><span class="type">guint32</span> rgba</code></em>);</pre>
<p>
Render the svp over the buf.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>the canvas buffer to render over</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>svp</code></em> :</span></p></td>
<td>the vector path to render</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgba</code></em> :</span></p></td>
<td>the rgba color to render</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-update-svp"></a><h3>gnome_canvas_update_svp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_update_svp (<em class="parameter"><code><a class="link" href="GnomeCanvas.html" title="GnomeCanvas"><span class="type">GnomeCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>);</pre>
<p>
Sets the svp to the new value, requesting repaint on what's changed. This
function takes responsibility for freeing new_svp.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td>the canvas containing the svp that needs updating.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p_svp</code></em> :</span></p></td>
<td>a pointer to the existing svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_svp</code></em> :</span></p></td>
<td>the new svp</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-update-svp-clip"></a><h3>gnome_canvas_update_svp_clip ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_update_svp_clip (<em class="parameter"><code><a class="link" href="GnomeCanvas.html" title="GnomeCanvas"><span class="type">GnomeCanvas</span></a> *canvas</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *clip_svp</code></em>);</pre>
<p>
Sets the svp to the new value, clipping if necessary, and requesting repaint
on what's changed. This function takes responsibility for freeing new_svp.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>canvas</code></em> :</span></p></td>
<td>the canvas containing the svp that needs updating.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p_svp</code></em> :</span></p></td>
<td>a pointer to the existing svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_svp</code></em> :</span></p></td>
<td>the new svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>clip_svp</code></em> :</span></p></td>
<td>a clip path, if non-null</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-item-reset-bounds"></a><h3>gnome_canvas_item_reset_bounds ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_item_reset_bounds (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>);</pre>
<p>
Resets the bounding box of a canvas item to an empty rectangle.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>A canvas item</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-item-update-svp"></a><h3>gnome_canvas_item_update_svp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_item_update_svp (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>);</pre>
<p>
Sets the svp to the new value, requesting repaint on what's changed. This
function takes responsibility for freeing new_svp. This routine also adds the
svp's bbox to the item's.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>the canvas item containing the svp that needs updating.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p_svp</code></em> :</span></p></td>
<td>a pointer to the existing svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_svp</code></em> :</span></p></td>
<td>the new svp</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-item-update-svp-clip"></a><h3>gnome_canvas_item_update_svp_clip ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_item_update_svp_clip (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> **p_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *new_svp</code></em>,
<em class="parameter"><code><span class="type">ArtSVP</span> *clip_svp</code></em>);</pre>
<p>
Sets the svp to the new value, clipping if necessary, and requesting repaint
on what's changed. This function takes responsibility for freeing new_svp.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>the canvas item containing the svp that needs updating.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>p_svp</code></em> :</span></p></td>
<td>a pointer to the existing svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>new_svp</code></em> :</span></p></td>
<td>the new svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>clip_svp</code></em> :</span></p></td>
<td>a clip path, if non-null</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-item-request-redraw-svp"></a><h3>gnome_canvas_item_request_redraw_svp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_item_request_redraw_svp
(<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code>const <span class="type">ArtSVP</span> *svp</code></em>);</pre>
<p>
Request redraw of the svp if in aa mode, or the entire item in in xlib mode.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>the item containing the svp</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>svp</code></em> :</span></p></td>
<td>the svp that needs to be redrawn</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-update-bbox"></a><h3>gnome_canvas_update_bbox ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_update_bbox (<em class="parameter"><code><a class="link" href="GnomeCanvasItem.html" title="GnomeCanvasItem"><span class="type">GnomeCanvasItem</span></a> *item</code></em>,
<em class="parameter"><code><span class="type">int</span> x1</code></em>,
<em class="parameter"><code><span class="type">int</span> y1</code></em>,
<em class="parameter"><code><span class="type">int</span> x2</code></em>,
<em class="parameter"><code><span class="type">int</span> y2</code></em>);</pre>
<p>
Sets the bbox to the new value, requesting full repaint.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
<td>the canvas item needing update</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x1</code></em> :</span></p></td>
<td>Left coordinate of the new bounding box</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y1</code></em> :</span></p></td>
<td>Top coordinate of the new bounding box</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x2</code></em> :</span></p></td>
<td>Right coordinate of the new bounding box</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y2</code></em> :</span></p></td>
<td>Bottom coordinate of the new bounding box</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-buf-ensure-buf"></a><h3>gnome_canvas_buf_ensure_buf ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gnome_canvas_buf_ensure_buf (<em class="parameter"><code><a class="link" href="GnomeCanvas.html#GnomeCanvasBuf" title="GnomeCanvasBuf"><span class="type">GnomeCanvasBuf</span></a> *buf</code></em>);</pre>
<p>
Ensure that the buffer is in RGB format, suitable for compositing.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td>
<td>the buf that needs to be represened in RGB format</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-join-gdk-to-art"></a><h3>gnome_canvas_join_gdk_to_art ()</h3>
<pre class="programlisting"><span class="returnvalue">ArtPathStrokeJoinType</span> gnome_canvas_join_gdk_to_art (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkJoinStyle"><span class="type">GdkJoinStyle</span></a> gdk_join</code></em>);</pre>
<p>
Convert from GDK line join specifier to libart.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_join</code></em> :</span></p></td>
<td>a join type, represented in GDK format</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The line join specifier in libart format.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-canvas-cap-gdk-to-art"></a><h3>gnome_canvas_cap_gdk_to_art ()</h3>
<pre class="programlisting"><span class="returnvalue">ArtPathStrokeCapType</span> gnome_canvas_cap_gdk_to_art (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkCapStyle"><span class="type">GdkCapStyle</span></a> gdk_cap</code></em>);</pre>
<p>
Convert from GDK line cap specifier to libart.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdk_cap</code></em> :</span></p></td>
<td>a cap type, represented in GDK format</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The line cap specifier in libart format.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|