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 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>toolShade</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="V_Sim API - Reference Manual">
<link rel="up" href="ch01.html" title="Core tools">
<link rel="prev" href="v-sim-toolColor.html" title="toolColor">
<link rel="next" href="v-sim-toolFileFormat.html" title="toolFileFormat">
<meta name="generator" content="GTK-Doc V1.14 (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="v-sim-toolColor.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.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">V_Sim API - Reference Manual</th>
<td><a accesskey="n" href="v-sim-toolFileFormat.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#v-sim-toolShade.synopsis" class="shortcut">Top</a>
|
<a href="#v-sim-toolShade.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="toolShade">
<a name="v-sim-toolShade"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="v-sim-toolShade.top_of_page"></a>toolShade</span></h2>
<p>toolShade — Shades are color gradients.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="v-sim-toolShade.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct <a class="link" href="v-sim-toolShade.html#Shade-struct" title="struct Shade_struct">Shade_struct</a>;
typedef <a class="link" href="v-sim-toolShade.html#Shade" title="Shade">Shade</a>;
enum <a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode">ShadeColorMode</a>;
enum <a class="link" href="v-sim-toolShade.html#ShadeMode" title="enum ShadeMode">ShadeMode</a>;
<a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* <a class="link" href="v-sim-toolShade.html#shadeNew" title="shadeNew ()">shadeNew</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *labelUTF8</code></em>,
<em class="parameter"><code><span class="type">float</span> vectA[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> vectB[3]</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> colorMode</code></em>);
<a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* <a class="link" href="v-sim-toolShade.html#shadeNew-fromData" title="shadeNew_fromData ()">shadeNew_fromData</a> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *labelUTF8</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh1</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh2</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh3</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> colorMode</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-toolShade.html#shadeFree" title="shadeFree ()">shadeFree</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* <a class="link" href="v-sim-toolShade.html#shadeCopy" title="shadeCopy ()">shadeCopy</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-toolShade.html#shadeCompare" title="shadeCompare ()">shadeCompare</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *sh1</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *sh2</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* <a class="link" href="v-sim-toolShade.html#shadeGet-label" title="shadeGet_label ()">shadeGet_label</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="returnvalue">ShadeColorMode</span></a> <a class="link" href="v-sim-toolShade.html#shadeGet-colorMode" title="shadeGet_colorMode ()">shadeGet_colorMode</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-toolShade.html#shadeSet-colorMode" title="shadeSet_colorMode ()">shadeSet_colorMode</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> mode</code></em>);
<a class="link" href="v-sim-toolShade.html#ShadeMode" title="enum ShadeMode"><span class="returnvalue">ShadeMode</span></a> <a class="link" href="v-sim-toolShade.html#shadeGet-mode" title="shadeGet_mode ()">shadeGet_mode</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-toolShade.html#shadeGet-linearCoeff" title="shadeGet_linearCoeff ()">shadeGet_linearCoeff</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> **vectA</code></em>,
<em class="parameter"><code><span class="type">float</span> **vectB</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="v-sim-toolShade.html#shadeSet-linearCoeff" title="shadeSet_linearCoeff ()">shadeSet_linearCoeff</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> coeff</code></em>,
<em class="parameter"><code><span class="type">int</span> channel</code></em>,
<em class="parameter"><code><span class="type">int</span> order</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-toolShade.html#shadeGet-valueTransformedInRGB" title="shadeGet_valueTransformedInRGB ()">shadeGet_valueTransformedInRGB</a> (<em class="parameter"><code>const <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> rgba[4]</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-toolShade.html#shadeGet-RGBFromValues" title="shadeGet_RGBFromValues ()">shadeGet_RGBFromValues</a> (<em class="parameter"><code>const <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> rgba[4]</code></em>,
<em class="parameter"><code><span class="type">float</span> values[3]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="v-sim-toolShade.html#shadeDraw-legend" title="shadeDraw_legend ()">shadeDraw_legend</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> widthVal</code></em>,
<em class="parameter"><code><span class="type">float</span> heightVal</code></em>,
<em class="parameter"><code><span class="type">float</span> minMax[2]</code></em>,
<em class="parameter"><code><span class="type">float</span> *marks</code></em>,
<em class="parameter"><code><span class="type">int</span> nbMarks</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolMatrix.html#ToolMatrixScalingFlag" title="enum ToolMatrixScalingFlag"><span class="type">ToolMatrixScalingFlag</span></a> scale</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* <a class="link" href="v-sim-toolShade.html#toolShadeListGet" title="toolShadeListGet ()">toolShadeListGet</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* <a class="link" href="v-sim-toolShade.html#toolShadeListAppend" title="toolShadeListAppend ()">toolShadeListAppend</a> (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* <a class="link" href="v-sim-toolShade.html#toolShadeBuild-presetList" title="toolShadeBuild_presetList ()">toolShadeBuild_presetList</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="v-sim-toolShade.description"></a><h2>Description</h2>
<p>
</p>
<p>This module allow V_Sim to deal with color gradients. Such a
gradient is defined by a linear transformation of color space. This
space can be RBG or HSV (see the enum <a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a>). This linear
transformation can be written [resulting color vector] = [vectB] +
lambda.[vectA], where lambda denotes the input variable of the
gradient (ranging from 0 to 1). Resulting color vector are clamped
to [0;1] if needed.</p>
<p>
</p>
<p>Use <a class="link" href="v-sim-toolShade.html#shadeNew" title="shadeNew ()"><code class="function">shadeNew()</code></a> to create a new shade, giving the arguments as
defined above. A shade can be linked to an image to represent it,
use <a href="v-sim-toolShade.html#shadeSet-pathToImage"><code class="function">shadeSet_pathToImage()</code></a> to do it.</p>
<p>
</p>
<p>To share color gradients between modules in V_Sim, you can
add new shade to the global list of stored shades using
<a class="link" href="v-sim-toolShade.html#toolShadeListAppend" title="toolShadeListAppend ()"><code class="function">toolShadeListAppend()</code></a> and get this list with a call to
<a class="link" href="v-sim-toolShade.html#toolShadeListGet" title="toolShadeListGet ()"><code class="function">toolShadeListGet()</code></a>.</p>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="v-sim-toolShade.details"></a><h2>Details</h2>
<div class="refsect2" title="struct Shade_struct">
<a name="Shade-struct"></a><h3>struct Shade_struct</h3>
<pre class="programlisting">struct Shade_struct;</pre>
<p>
Opaque structure to store linear shade informations.
</p>
</div>
<hr>
<div class="refsect2" title="Shade">
<a name="Shade"></a><h3>Shade</h3>
<pre class="programlisting">typedef struct Shade_struct Shade;
</pre>
<p>
Short name to address Shade_struct objects.
</p>
</div>
<hr>
<div class="refsect2" title="enum ShadeColorMode">
<a name="ShadeColorMode"></a><h3>enum ShadeColorMode</h3>
<pre class="programlisting">typedef enum
{
shade_colorModeRGB,
shade_colorModeHSV,
shade_nb_colorMode
} ShadeColorMode;
</pre>
<p>
Defines color mode : Red-Green-Blue or Hue-Saturation-Value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="shade-colorModeRGB"></a><span class="term"><code class="literal">shade_colorModeRGB</code></span></p></td>
<td>variation described in the shade are applied to RGB coding colors ;
</td>
</tr>
<tr>
<td><p><a name="shade-colorModeHSV"></a><span class="term"><code class="literal">shade_colorModeHSV</code></span></p></td>
<td>variation described in the shade are applied to HSV coding colors ;
</td>
</tr>
<tr>
<td><p><a name="shade-nb-colorMode"></a><span class="term"><code class="literal">shade_nb_colorMode</code></span></p></td>
<td>number of modes available.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum ShadeMode">
<a name="ShadeMode"></a><h3>enum ShadeMode</h3>
<pre class="programlisting">typedef enum
{
shade_modeLinear,
shade_modeArray,
shade_nb_mode
} ShadeMode;
</pre>
<p>
Defines the storage of the shade mode.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="shade-modeLinear"></a><span class="term"><code class="literal">shade_modeLinear</code></span></p></td>
<td>all channels are defined by a linear variation
Ax+B ;
</td>
</tr>
<tr>
<td><p><a name="shade-modeArray"></a><span class="term"><code class="literal">shade_modeArray</code></span></p></td>
<td>all channels are defined by a given array of
values ;
</td>
</tr>
<tr>
<td><p><a name="shade-nb-mode"></a><span class="term"><code class="literal">shade_nb_mode</code></span></p></td>
<td>the number of different shade mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeNew ()">
<a name="shadeNew"></a><h3>shadeNew ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* shadeNew (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *labelUTF8</code></em>,
<em class="parameter"><code><span class="type">float</span> vectA[3]</code></em>,
<em class="parameter"><code><span class="type">float</span> vectB[3]</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> colorMode</code></em>);</pre>
<p>
Create a linear shade. Its profile is given by an AX+B formula,
dealing on three channels. These channels are defined by the
<em class="parameter"><code>colorMode</code></em> parameter. All given values are copied when the new
shade is created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>labelUTF8</code></em> :</span></p></td>
<td>a UTF8 string that shortly named this new shade ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectA</code></em> :</span></p></td>
<td>an array of three floating point values ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectB</code></em> :</span></p></td>
<td>an array of three floating point values ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>colorMode</code></em> :</span></p></td>
<td>an integer that describes the color code (see <a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> enumeration).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the newly created Shade.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeNew_fromData ()">
<a name="shadeNew-fromData"></a><h3>shadeNew_fromData ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* shadeNew_fromData (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *labelUTF8</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh1</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh2</code></em>,
<em class="parameter"><code><span class="type">float</span> *vectCh3</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> colorMode</code></em>);</pre>
<p>
Create a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> from direct data for three channels. These channels
are defined by the <em class="parameter"><code>colorMode</code></em> parameter. All given values are
copied when the new shade is created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>labelUTF8</code></em> :</span></p></td>
<td>a UTF8 string that shortly named this new shade ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>the size of arguments <em class="parameter"><code>vectCh1</code></em>, <em class="parameter"><code>vectCh2</code></em> and <em class="parameter"><code>vectCh3</code></em> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectCh1</code></em> :</span></p></td>
<td>an array of floating point values for the first channel ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectCh2</code></em> :</span></p></td>
<td>an array of floating point values for the first channel ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectCh3</code></em> :</span></p></td>
<td>an array of floating point values for the first channel ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>colorMode</code></em> :</span></p></td>
<td>an integer that describes the color code (see
<a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> enumeration).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the newly created Shade.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeFree ()">
<a name="shadeFree"></a><h3>shadeFree ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> shadeFree (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Free all dynamic memory from <em class="parameter"><code>shade</code></em> and free <em class="parameter"><code>shade</code></em> itself.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeCopy ()">
<a name="shadeCopy"></a><h3>shadeCopy ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="returnvalue">Shade</span></a>* shadeCopy (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Create a new shade deep copy of the first.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly created shade.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeCompare ()">
<a name="shadeCompare"></a><h3>shadeCompare ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> shadeCompare (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *sh1</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *sh2</code></em>);</pre>
<p>
Compare if the two shade are identical (first, smae mode, then same
values).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>sh1</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sh2</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if <em class="parameter"><code>shade1</code></em> is equivalent to <em class="parameter"><code>shade2</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_label ()">
<a name="shadeGet-label"></a><h3>shadeGet_label ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a>* shadeGet_label (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Get the name (in UTF8) of the shade.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a string naming the shade.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_colorMode ()">
<a name="shadeGet-colorMode"></a><h3>shadeGet_colorMode ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="returnvalue">ShadeColorMode</span></a> shadeGet_colorMode (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Get the color mode of the shade (RGB or HSV).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the color mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeSet_colorMode ()">
<a name="shadeSet-colorMode"></a><h3>shadeSet_colorMode ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> shadeSet_colorMode (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a> mode</code></em>);</pre>
<p>
Change the mode of the shade, see <a class="link" href="v-sim-toolShade.html#ShadeColorMode" title="enum ShadeColorMode"><span class="type">ShadeColorMode</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mode</code></em> :</span></p></td>
<td>a new mode for the shade.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if <em class="parameter"><code>mode</code></em> is different from previous <em class="parameter"><code>shade</code></em> mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_mode ()">
<a name="shadeGet-mode"></a><h3>shadeGet_mode ()</h3>
<pre class="programlisting"><a class="link" href="v-sim-toolShade.html#ShadeMode" title="enum ShadeMode"><span class="returnvalue">ShadeMode</span></a> shadeGet_mode (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Get the mode of the shade (linear, array...).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the mode.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_linearCoeff ()">
<a name="shadeGet-linearCoeff"></a><h3>shadeGet_linearCoeff ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> shadeGet_linearCoeff (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> **vectA</code></em>,
<em class="parameter"><code><span class="type">float</span> **vectB</code></em>);</pre>
<p>
This methods can get the linear color transformation. The given
arrays (<em class="parameter"><code>vectA</code></em>, <em class="parameter"><code>vectB</code></em>) are read-only. This method return
FALSE if the <em class="parameter"><code>shade</code></em> is not in a <a class="link" href="v-sim-toolShade.html#shade-modeLinear"><span class="type">shade_modeLinear</span></a> state.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectA</code></em> :</span></p></td>
<td>a pointer to a floating point values array to store vect in AX+B ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>vectB</code></em> :</span></p></td>
<td>a pointer to a floating point values array to store vect in AX+B.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if <em class="parameter"><code>vectA</code></em>, <em class="parameter"><code>vectB</code></em> and <em class="parameter"><code>vectX</code></em> have been set correctly.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeSet_linearCoeff ()">
<a name="shadeSet-linearCoeff"></a><h3>shadeSet_linearCoeff ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> shadeSet_linearCoeff (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> coeff</code></em>,
<em class="parameter"><code><span class="type">int</span> channel</code></em>,
<em class="parameter"><code><span class="type">int</span> order</code></em>);</pre>
<p>
Change one value <em class="parameter"><code>coeff</code></em> of the linear mode for the given <em class="parameter"><code>shade</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>coeff</code></em> :</span></p></td>
<td>a new value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>channel</code></em> :</span></p></td>
<td>either RGBA (from 0 to 3) ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>order</code></em> :</span></p></td>
<td>the order in the linear approx (0 means constant and 1 is
the linear coeeficient).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE if the new value changes anything.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_valueTransformedInRGB ()">
<a name="shadeGet-valueTransformedInRGB"></a><h3>shadeGet_valueTransformedInRGB ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> shadeGet_valueTransformedInRGB (<em class="parameter"><code>const <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> rgba[4]</code></em>,
<em class="parameter"><code><span class="type">float</span> value</code></em>);</pre>
<p>
Give a RGBA vector for the given value.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgba</code></em> :</span></p></td>
<td>an array of size [4] ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value ranged in [0;1].
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeGet_RGBFromValues ()">
<a name="shadeGet-RGBFromValues"></a><h3>shadeGet_RGBFromValues ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> shadeGet_RGBFromValues (<em class="parameter"><code>const <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> rgba[4]</code></em>,
<em class="parameter"><code><span class="type">float</span> values[3]</code></em>);</pre>
<p>
Like <a class="link" href="v-sim-toolShade.html#shadeGet-valueTransformedInRGB" title="shadeGet_valueTransformedInRGB ()"><code class="function">shadeGet_valueTransformedInRGB()</code></a> but here, the three values
are applied respectivly for the Red, the Green and the Blue
channel.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgba</code></em> :</span></p></td>
<td>a location to store the result of the colour transformation ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>values</code></em> :</span></p></td>
<td>inout values.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="shadeDraw_legend ()">
<a name="shadeDraw-legend"></a><h3>shadeDraw_legend ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> shadeDraw_legend (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>,
<em class="parameter"><code><span class="type">float</span> widthVal</code></em>,
<em class="parameter"><code><span class="type">float</span> heightVal</code></em>,
<em class="parameter"><code><span class="type">float</span> minMax[2]</code></em>,
<em class="parameter"><code><span class="type">float</span> *marks</code></em>,
<em class="parameter"><code><span class="type">int</span> nbMarks</code></em>,
<em class="parameter"><code><a class="link" href="v-sim-toolMatrix.html#ToolMatrixScalingFlag" title="enum ToolMatrixScalingFlag"><span class="type">ToolMatrixScalingFlag</span></a> scale</code></em>);</pre>
<p>
This method calls OpenGL primitive to draw a coloured legend on the rendering
surface. If <em class="parameter"><code>widthVal</code></em> is negative then the default value in pixel is used. If <em class="parameter"><code>widthVal</code></em>
is smaller than 1., the width is taken as a percentage of the width of the rendering area.
Finaly, if <em class="parameter"><code>widthVal</code></em> is larger than 1., the width of the legend in pixel is the given value.
If <em class="parameter"><code>marks</code></em> is not NULL, some marks are set on the legend for the
given values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a valid <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>widthVal</code></em> :</span></p></td>
<td>a floating point value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>heightVal</code></em> :</span></p></td>
<td>a floating point value ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>minMax</code></em> :</span></p></td>
<td>the min & max value of the represented shaded color ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>marks</code></em> :</span></p></td>
<td>an array of values bounded by <em class="parameter"><code>minMax</code></em> ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nbMarks</code></em> :</span></p></td>
<td>the number of elements in the <em class="parameter"><code>marks</code></em> array ;
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scale</code></em> :</span></p></td>
<td>the kind of transformation.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="toolShadeListGet ()">
<a name="toolShadeListGet"></a><h3>toolShadeListGet ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* toolShadeListGet (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
It returns a read-only pointer to the internal shade list. Use <a class="link" href="v-sim-toolShade.html#toolShadeListAppend" title="toolShadeListAppend ()"><code class="function">toolShadeListAppend()</code></a>
to add new shades to this list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a pointer to the internal shade list.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="toolShadeListAppend ()">
<a name="toolShadeListAppend"></a><h3>toolShadeListAppend ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* toolShadeListAppend (<em class="parameter"><code><a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> *shade</code></em>);</pre>
<p>
Add a shape to the internal list. Use the return value or <a class="link" href="v-sim-toolShade.html#toolShadeListGet" title="toolShadeListGet ()"><code class="function">toolShadeListGet()</code></a> method
to look into this list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>shade</code></em> :</span></p></td>
<td>a <a class="link" href="v-sim-toolShade.html#Shade" title="Shade"><span class="type">Shade</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a read-only pointer to the internal shade list.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="toolShadeBuild_presetList ()">
<a name="toolShadeBuild-presetList"></a><h3>toolShadeBuild_presetList ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a>* toolShadeBuild_presetList (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Create a list of preset shades.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a read-only pointer to the internal shade list.
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|