This file is indexed.

/usr/share/gtk-doc/html/libgwydraw/libgwydraw-GwyRGBA.html is in libgwyddion20-doc 2.34-3ubuntu1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Gwyddion Drawing Library Reference Manual: GwyRGBA</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Gwyddion Drawing Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Drawing Library Reference Manual">
<link rel="prev" href="index.html" title="Gwyddion Drawing Library Reference Manual">
<link rel="next" href="GwyGradient.html" title="GwyGradient">
<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="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
                   | 
                  <a href="#libgwydraw-GwyRGBA.description" class="shortcut">Description</a>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="index.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GwyGradient.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwydraw-GwyRGBA"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwydraw-GwyRGBA.top_of_page"></a>GwyRGBA</span></h2>
<p>GwyRGBA — Bit depth independet RGBA colors</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgwydraw-GwyRGBA.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libdraw/gwydraw.h&gt;

                    <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA">GwyRGBA</a>;
<a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="returnvalue">GwyRGBA</span></a> *           <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-copy" title="gwy_rgba_copy ()">gwy_rgba_copy</a>                       (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-free" title="gwy_rgba_free ()">gwy_rgba_free</a>                       (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-to-gdk-color" title="gwy_rgba_to_gdk_color ()">gwy_rgba_to_gdk_color</a>               (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-to-gdk-alpha" title="gwy_rgba_to_gdk_alpha ()">gwy_rgba_to_gdk_alpha</a>               (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-from-gdk-color" title="gwy_rgba_from_gdk_color ()">gwy_rgba_from_gdk_color</a>             (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/gtk/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-from-gdk-color-and-alpha" title="gwy_rgba_from_gdk_color_and_alpha ()">gwy_rgba_from_gdk_color_and_alpha</a>   (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/gtk/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> gdkalpha</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-interpolate" title="gwy_rgba_interpolate ()">gwy_rgba_interpolate</a>                (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *src1</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *src2</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-get-from-container" title="gwy_rgba_get_from_container ()">gwy_rgba_get_from_container</a>         (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-store-to-container" title="gwy_rgba_store_to_container ()">gwy_rgba_store_to_container</a>         (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-remove-from-container" title="gwy_rgba_remove_from_container ()">gwy_rgba_remove_from_container</a>      (<em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-set-gdk-gc-fg" title="gwy_rgba_set_gdk_gc_fg ()">gwy_rgba_set_gdk_gc_fg</a>              (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-set-gdk-gc-bg" title="gwy_rgba_set_gdk_gc_bg ()">gwy_rgba_set_gdk_gc_bg</a>              (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/gtk/gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-to-hex6" title="gwy_rgba_to_hex6 ()">gwy_rgba_to_hex6</a>                    (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hexout</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-to-hex8" title="gwy_rgba_to_hex8 ()">gwy_rgba_to_hex8</a>                    (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hexout</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgwydraw-GwyRGBA.description"></a><h2>Description</h2>
<p>
<a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> is a bit depth independent representation of an RGB or RGBA color,
using floating point values from the [0,1] interval.
</p>
<p>
<a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> is not an object, but a simple struct that can be allocated on
stack on created with <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Memory-Allocation.html#g-new"><code class="function">g_new()</code></a> or <code class="function">malloc()</code>. Helper functions for conversion
between <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> and <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> (<a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-to-gdk-color" title="gwy_rgba_to_gdk_color ()"><code class="function">gwy_rgba_to_gdk_color()</code></a>,
<a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-from-gdk-color" title="gwy_rgba_from_gdk_color ()"><code class="function">gwy_rgba_from_gdk_color()</code></a>) and for <a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> storage by component
(<a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-store-to-container" title="gwy_rgba_store_to_container ()"><code class="function">gwy_rgba_store_to_container()</code></a>, <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-get-from-container" title="gwy_rgba_get_from_container ()"><code class="function">gwy_rgba_get_from_container()</code></a>) are provided.
</p>
</div>
<div class="refsect1">
<a name="libgwydraw-GwyRGBA.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GwyRGBA"></a><h3>GwyRGBA</h3>
<pre class="programlisting">typedef struct {
    gdouble r;
    gdouble g;
    gdouble b;
    gdouble a;
} GwyRGBA;
</pre>
<p>
RGB[A] color specification type.
</p>
<p>
All values are from the range [0,1].
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GwyRGBA.r"></a>r</code></em>;</span></p></td>
<td>The red component.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GwyRGBA.g"></a>g</code></em>;</span></p></td>
<td>The green component.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GwyRGBA.b"></a>b</code></em>;</span></p></td>
<td>The blue component.</td>
</tr>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> <em class="structfield"><code><a name="GwyRGBA.a"></a>a</code></em>;</span></p></td>
<td>The alpha (opacity) value.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-copy"></a><h3>gwy_rgba_copy ()</h3>
<pre class="programlisting"><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="returnvalue">GwyRGBA</span></a> *           gwy_rgba_copy                       (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);</pre>
<p>
Makes a copy of a rgba structure. The result must be freed using
<a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-free" title="gwy_rgba_free ()"><code class="function">gwy_rgba_free()</code></a>.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A copy of <em class="parameter"><code>rgba</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-free"></a><h3>gwy_rgba_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_free                       (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);</pre>
<p>
Frees an rgba structure created with <a class="link" href="libgwydraw-GwyRGBA.html#gwy-rgba-copy" title="gwy_rgba_copy ()"><code class="function">gwy_rgba_copy()</code></a>.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-to-gdk-color"></a><h3>gwy_rgba_to_gdk_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_to_gdk_color               (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>);</pre>
<p>
Converts a rgba to a Gdk color.
</p>
<p>
Note no allocation is performed, just channel value conversion.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdkcolor</code></em> :</span></p></td>
<td>A <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-to-gdk-alpha"></a><h3>gwy_rgba_to_gdk_alpha ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a>             gwy_rgba_to_gdk_alpha               (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);</pre>
<p>
Converts a rgba to a Gdk opacity value.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The opacity value as a 16bit integer.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-from-gdk-color"></a><h3>gwy_rgba_from_gdk_color ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_from_gdk_color             (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>);</pre>
<p>
Converts a Gdk color to a rgba.
</p>
<p>
The alpha value is unchanged, as <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> has no opacity information.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdkcolor</code></em> :</span></p></td>
<td>A <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-from-gdk-color-and-alpha"></a><h3>gwy_rgba_from_gdk_color_and_alpha ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_from_gdk_color_and_alpha   (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a> *gdkcolor</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> gdkalpha</code></em>);</pre>
<p>
Converts a Gdk color plus an opacity value to a rgba.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdkcolor</code></em> :</span></p></td>
<td>A <a href="/usr/share/gtk-doc/html/gdk3/gdk3-Colors.html#GdkColor"><span class="type">GdkColor</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gdkalpha</code></em> :</span></p></td>
<td>Gdk 16bit opacity value.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-interpolate"></a><h3>gwy_rgba_interpolate ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_interpolate                (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *src1</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *src2</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> x</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>);</pre>
<p>
Linearly interpolates two colors, including alpha blending.
</p>
<p>
Correct blending of two not fully opaque colors is tricky.  Always use
this function, not simple independent interpolation of r, g, b, and a.
</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>src1</code></em> :</span></p></td>
<td>Color at point <em class="parameter"><code>x</code></em> = 0.0.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>src2</code></em> :</span></p></td>
<td>Color at point <em class="parameter"><code>x</code></em> = 1.0.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>Point in interval 0..1 to take color from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rgba</code></em> :</span></p></td>
<td>A <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> to store result to.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-get-from-container"></a><h3>gwy_rgba_get_from_container ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_rgba_get_from_container         (<em class="parameter"><code><a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);</pre>
<p>
Gets RGBA color components from a container.
</p>
<p>
This is a convenience function to get the components in the common
arrangement.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
<td>A <a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to get the color components from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>Prefix in <em class="parameter"><code>container</code></em>, e.g. "/0/mask" (it would try to fetch
"/0/mask/red", "/0/mask/green", etc. then).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether all <em class="parameter"><code>rgba</code></em> components were successfully found and set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-store-to-container"></a><h3>gwy_rgba_store_to_container ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_store_to_container         (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);</pre>
<p>
Stores RGBA color components to a container.
</p>
<p>
This is a convenience function to store the components in the common
arrangement.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
<td>A <a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to store the color components to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>Prefix in <em class="parameter"><code>container</code></em>, e.g. "/0/mask" (it will store
"/0/mask/red", "/0/mask/green", etc. then).</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-remove-from-container"></a><h3>gwy_rgba_remove_from_container ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gwy_rgba_remove_from_container      (<em class="parameter"><code><a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> *container</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *prefix</code></em>);</pre>
<p>
Removes RGBA color components from a container.
</p>
<p>
This is a convenience function to remove the components in the common
arrangement.
</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>container</code></em> :</span></p></td>
<td>A <a href="../libgwyddion/GwyContainer.html"><span class="type">GwyContainer</span></a> to remove the color components from.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>Prefix in <em class="parameter"><code>container</code></em>, e.g. "/0/mask" (it will remove
"/0/mask/red", "/0/mask/green", etc. then).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if anything was removed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-set-gdk-gc-fg"></a><h3>gwy_rgba_set_gdk_gc_fg ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_set_gdk_gc_fg              (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<p>
Sets foreground color of a Gdk graphics context from a RGBA color.
</p>
<p>
This is a convenience wrapper around <a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#gdk-gc-set-rgb-fg-color"><code class="function">gdk_gc_set_rgb_fg_color()</code></a>, see its
documentation for details and caveats.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.  Its alpha component is ignored, only RGB is used.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>A Gdk graphics context to set forgeground color of.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-set-gdk-gc-bg"></a><h3>gwy_rgba_set_gdk_gc_bg ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_set_gdk_gc_bg              (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#GdkGC"><span class="type">GdkGC</span></a> *gc</code></em>);</pre>
<p>
Sets foreground color of a Gdk graphics context from a RGBA color.
</p>
<p>
This is a convenience wrapper around <a href="/usr/share/gtk-doc/html/gdk2/gdk2-Graphics-Contexts.html#gdk-gc-set-rgb-bg-color"><code class="function">gdk_gc_set_rgb_bg_color()</code></a>, see its
documentation for details and caveats.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.  Its alpha component is ignored, only RGB is used.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gc</code></em> :</span></p></td>
<td>A Gdk graphics context to set forgeground color of.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-to-hex6"></a><h3>gwy_rgba_to_hex6 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_to_hex6                    (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hexout</code></em>);</pre>
<p>
Formats the R, G and B components of a RGBA color to hexadecimal string.
</p>
<p>
The component order is R, G and B.  The output has always exactly 6 bytes
and does not include any "#" prefix which is used in some contexts.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.  Its alpha component is ignored, only RGB is used.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hexout</code></em> :</span></p></td>
<td>Buffer at least seven character long where the hexadecimal
representation (e.g. "ff0000" for red) will be stored.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.32</p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-rgba-to-hex8"></a><h3>gwy_rgba_to_hex8 ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gwy_rgba_to_hex8                    (<em class="parameter"><code>const <a class="link" href="libgwydraw-GwyRGBA.html#GwyRGBA" title="GwyRGBA"><span class="type">GwyRGBA</span></a> *rgba</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *hexout</code></em>);</pre>
<p>
Formats all components of a RGBA color to hexadecimal string.
</p>
<p>
The component order is A, R, G and B.  Note that while this order is a
common it is by no means universal.  The output has always exactly 8 bytes
and does not include any "#" prefix which is used in some contexts.
</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>rgba</code></em> :</span></p></td>
<td>A RGBA color.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hexout</code></em> :</span></p></td>
<td>Buffer at least nine character long where the hexadecimal
representation (e.g. "ffff0000" for opaque red) will be stored.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.32</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>