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
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimpunit: GIMP Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP Base Library Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase-gimpsignal.html" title="gimpsignal">
<link rel="next" href="libgimpbase-gimputils.html" title="gimputils">
<meta name="generator" content="GTK-Doc V1.33.1 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgimpbase-gimpunit.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimpbase-gimpsignal.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpbase-gimputils.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpbase-gimpunit"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpbase-gimpunit.top_of_page"></a>gimpunit</span></h2>
<p>gimpunit — Provides a collection of predefined units and
functions for creating user-defined units.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-units" title="gimp_unit_get_number_of_units ()">gimp_unit_get_number_of_units</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-number-of-built-in-units" title="gimp_unit_get_number_of_built_in_units ()">gimp_unit_get_number_of_built_in_units</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="returnvalue">GimpUnit</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-new" title="gimp_unit_new ()">gimp_unit_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-deletion-flag" title="gimp_unit_get_deletion_flag ()">gimp_unit_get_deletion_flag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-set-deletion-flag" title="gimp_unit_set_deletion_flag ()">gimp_unit_set_deletion_flag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-factor" title="gimp_unit_get_factor ()">gimp_unit_get_factor</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-digits" title="gimp_unit_get_digits ()">gimp_unit_get_digits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-scaled-digits" title="gimp_unit_get_scaled_digits ()">gimp_unit_get_scaled_digits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-identifier" title="gimp_unit_get_identifier ()">gimp_unit_get_identifier</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-symbol" title="gimp_unit_get_symbol ()">gimp_unit_get_symbol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-abbreviation" title="gimp_unit_get_abbreviation ()">gimp_unit_get_abbreviation</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-singular" title="gimp_unit_get_singular ()">gimp_unit_get_singular</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-plural" title="gimp_unit_get_plural ()">gimp_unit_get_plural</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-format-string" title="gimp_unit_format_string ()">gimp_unit_format_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-pixels-to-units" title="gimp_pixels_to_units ()">gimp_pixels_to_units</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-pixels" title="gimp_units_to_pixels ()">gimp_units_to_pixels</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gdouble</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-units-to-points" title="gimp_units_to_points ()">gimp_units_to_points</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-is-metric" title="gimp_unit_is_metric ()">gimp_unit_is_metric</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#GIMP-IS-PARAM-SPEC-UNIT:CAPS" title="GIMP_IS_PARAM_SPEC_UNIT()">GIMP_IS_PARAM_SPEC_UNIT</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GParamSpec</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#gimp-param-spec-unit" title="gimp_param_spec_unit ()">gimp_param_spec_unit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpunit.html#GIMP-VALUE-HOLDS-UNIT:CAPS" title="GIMP_VALUE_HOLDS_UNIT()">GIMP_VALUE_HOLDS_UNIT</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit">GimpUnit</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT">GIMP_TYPE_UNIT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-PARAM-UNIT:CAPS" title="GIMP_TYPE_PARAM_UNIT">GIMP_TYPE_PARAM_UNIT</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.description"></a><h2>Description</h2>
<p>Provides a collection of predefined units and functions for
creating user-defined units.</p>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-unit-get-number-of-units"></a><h3>gimp_unit_get_number_of_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_unit_get_number_of_units (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of units which are known to the <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> system.</p>
<div class="refsect3">
<a name="gimp-unit-get-number-of-units.returns"></a><h4>Returns</h4>
<p> The number of defined units.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-number-of-built-in-units"></a><h3>gimp_unit_get_number_of_built_in_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_unit_get_number_of_built_in_units
(<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the number of <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s which are hardcoded in the unit system
(UNIT_INCH, UNIT_MM, UNIT_POINT, UNIT_PICA and the two "pseudo unit"
UNIT_PIXEL).</p>
<div class="refsect3">
<a name="gimp-unit-get-number-of-built-in-units.returns"></a><h4>Returns</h4>
<p> The number of built-in units.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-new"></a><h3>gimp_unit_new ()</h3>
<pre class="programlisting"><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="returnvalue">GimpUnit</span></a>
gimp_unit_new (<em class="parameter"><code><span class="type">gchar</span> *identifier</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> factor</code></em>,
<em class="parameter"><code><span class="type">gint</span> digits</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *symbol</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *abbreviation</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *singular</code></em>,
<em class="parameter"><code><span class="type">gchar</span> *plural</code></em>);</pre>
<p>Returns the integer ID of the new <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>.</p>
<p>Note that a new unit is always created with its deletion flag
set to <code class="literal">TRUE</code>. You will have to set it to <code class="literal">FALSE</code> with
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-set-deletion-flag" title="gimp_unit_set_deletion_flag ()"><code class="function">gimp_unit_set_deletion_flag()</code></a> to make the unit definition persistent.</p>
<div class="refsect3">
<a name="gimp-unit-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>identifier</p></td>
<td class="parameter_description"><p>The unit's identifier string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>factor</p></td>
<td class="parameter_description"><p>The unit's factor (how many units are in one inch).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>digits</p></td>
<td class="parameter_description"><p>The unit's suggested number of digits (see <a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-digits" title="gimp_unit_get_digits ()"><code class="function">gimp_unit_get_digits()</code></a>).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>symbol</p></td>
<td class="parameter_description"><p>The symbol of the unit (e.g. "''" for inch).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>abbreviation</p></td>
<td class="parameter_description"><p>The abbreviation of the unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>singular</p></td>
<td class="parameter_description"><p>The singular form of the unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>plural</p></td>
<td class="parameter_description"><p>The plural form of the unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-new.returns"></a><h4>Returns</h4>
<p> The ID of the new unit.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-deletion-flag"></a><h3>gimp_unit_get_deletion_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_unit_get_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<div class="refsect3">
<a name="gimp-unit-get-deletion-flag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the <em class="parameter"><code>deletion_flag</code></em>
of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-deletion-flag.returns"></a><h4>Returns</h4>
<p> The unit's <em class="parameter"><code>deletion_flag</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-set-deletion-flag"></a><h3>gimp_unit_set_deletion_flag ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_unit_set_deletion_flag (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> deletion_flag</code></em>);</pre>
<p>Sets a <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>deletion_flag</code></em>
. If the <em class="parameter"><code>deletion_flag</code></em>
of a unit is
<code class="literal">TRUE</code> when GIMP exits, this unit will not be saved in the users's
"unitrc" file.</p>
<p>Trying to change the <em class="parameter"><code>deletion_flag</code></em>
of a built-in unit will be silently
ignored.</p>
<div class="refsect3">
<a name="gimp-unit-set-deletion-flag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to set the <em class="parameter"><code>deletion_flag</code></em>
for.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>deletion_flag</p></td>
<td class="parameter_description"><p>The new deletion_flag.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-factor"></a><h3>gimp_unit_get_factor ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_unit_get_factor (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>A <a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a>'s <em class="parameter"><code>factor</code></em>
is defined to be:</p>
<p>distance_in_units == (<em class="parameter"><code>factor</code></em>
* distance_in_inches)</p>
<p>Returns 0 for <em class="parameter"><code>unit</code></em>
== GIMP_UNIT_PIXEL.</p>
<div class="refsect3">
<a name="gimp-unit-get-factor.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the factor of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-factor.returns"></a><h4>Returns</h4>
<p> The unit's factor.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-digits"></a><h3>gimp_unit_get_digits ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_unit_get_digits (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>Returns the number of digits set for <em class="parameter"><code>unit</code></em>
.
Built-in units' accuracy is approximately the same as an inch with
two digits. User-defined units can suggest a different accuracy.</p>
<p>Note: the value is as-set by defaults or by the user and does not
necessary provide enough precision on high-resolution images.
When the information is needed for a specific image, the use of
<a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-scaled-digits" title="gimp_unit_get_scaled_digits ()"><code class="function">gimp_unit_get_scaled_digits()</code></a> may be more appropriate.</p>
<p>Returns 0 for <em class="parameter"><code>unit</code></em>
== GIMP_UNIT_PIXEL.</p>
<div class="refsect3">
<a name="gimp-unit-get-digits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the digits.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-digits.returns"></a><h4>Returns</h4>
<p> The suggested number of digits.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-scaled-digits"></a><h3>gimp_unit_get_scaled_digits ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_unit_get_scaled_digits (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<p>Returns the number of digits a <em class="parameter"><code>unit</code></em>
field should provide to get
enough accuracy so that every pixel position shows a different
value from neighboring pixels.</p>
<p>Note: when needing digit accuracy to display a diagonal distance,
the <em class="parameter"><code>resolution</code></em>
may not correspond to the image's horizontal or
vertical resolution, but instead to the result of:
<code class="literal">distance_in_pixel / distance_in_inch</code>.</p>
<div class="refsect3">
<a name="gimp-unit-get-scaled-digits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the digits.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>the resolution in PPI.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-scaled-digits.returns"></a><h4>Returns</h4>
<p> The suggested number of digits.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-identifier"></a><h3>gimp_unit_get_identifier ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_unit_get_identifier (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is an untranslated string and must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-identifier.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the identifier of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-identifier.returns"></a><h4>Returns</h4>
<p> The unit's identifier.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-symbol"></a><h3>gimp_unit_get_symbol ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_unit_get_symbol (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>This is e.g. "''" for UNIT_INCH.</p>
<p>NOTE: This string must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-symbol.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the symbol of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-symbol.returns"></a><h4>Returns</h4>
<p> The unit's symbol.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-abbreviation"></a><h3>gimp_unit_get_abbreviation ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_unit_get_abbreviation (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated abbreviation
of the unit.</p>
<p>NOTE: This string must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-abbreviation.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the abbreviation of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-abbreviation.returns"></a><h4>Returns</h4>
<p> The unit's abbreviation.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-singular"></a><h3>gimp_unit_get_singular ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_unit_get_singular (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated singular form
of the unit's name.</p>
<p>NOTE: This string must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-singular.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the singular form of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-singular.returns"></a><h4>Returns</h4>
<p> The unit's singular form.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-get-plural"></a><h3>gimp_unit_get_plural ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_unit_get_plural (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>For built-in units, this function returns the translated plural form
of the unit's name.</p>
<p>NOTE: This string must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-unit-get-plural.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit you want to know the plural form of.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-get-plural.returns"></a><h4>Returns</h4>
<p> The unit's plural form.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-format-string"></a><h3>gimp_unit_format_string ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_unit_format_string (<em class="parameter"><code>const <span class="type">gchar</span> *format</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>The <em class="parameter"><code>format</code></em>
string supports the following percent expansions:</p>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td>% f</td>
<td>Factor (how many units make up an inch)</td>
</tr>
<tr>
<td>% y</td>
<td>Symbol (e.g. "''" for GIMP_UNIT_INCH)</td>
</tr>
<tr>
<td>% a</td>
<td>Abbreviation</td>
</tr>
<tr>
<td>% s</td>
<td>Singular</td>
</tr>
<tr>
<td>% p</td>
<td>Plural</td>
</tr>
<tr>
<td>%%</td>
<td>Literal percent</td>
</tr>
</tbody>
</table></div>
<div class="refsect3">
<a name="gimp-unit-format-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>A printf-like format string which is used to create the unit
string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>A unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-format-string.returns"></a><h4>Returns</h4>
<p> A newly allocated string with above percent expressions
replaced with the resp. strings for <em class="parameter"><code>unit</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-pixels-to-units"></a><h3>gimp_pixels_to_units ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_pixels_to_units (<em class="parameter"><code><span class="type">gdouble</span> pixels</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in pixels to <em class="parameter"><code>unit</code></em>
.</p>
<div class="refsect3">
<a name="gimp-pixels-to-units.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pixels</p></td>
<td class="parameter_description"><p>value in pixels</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>unit to convert to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>resolution in DPI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-pixels-to-units.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>pixels</code></em>
converted to units.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-pixels"></a><h3>gimp_units_to_pixels ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_units_to_pixels (<em class="parameter"><code><span class="type">gdouble</span> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to pixels.</p>
<div class="refsect3">
<a name="gimp-units-to-pixels.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>value in units</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>unit of <em class="parameter"><code>value</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>resloution in DPI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-units-to-pixels.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>value</code></em>
converted to pixels.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-units-to-points"></a><h3>gimp_units_to_points ()</h3>
<pre class="programlisting"><span class="returnvalue">gdouble</span>
gimp_units_to_points (<em class="parameter"><code><span class="type">gdouble</span> value</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>,
<em class="parameter"><code><span class="type">gdouble</span> resolution</code></em>);</pre>
<p>Converts a <em class="parameter"><code>value</code></em>
specified in <em class="parameter"><code>unit</code></em>
to points.</p>
<div class="refsect3">
<a name="gimp-units-to-points.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>value in units</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>unit of <em class="parameter"><code>value</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>resolution</p></td>
<td class="parameter_description"><p>resloution in DPI</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-units-to-points.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>value</code></em>
converted to points.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-unit-is-metric"></a><h3>gimp_unit_is_metric ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_unit_is_metric (<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> unit</code></em>);</pre>
<p>Checks if the given <em class="parameter"><code>unit</code></em>
is metric. A simplistic test is used
that looks at the unit's factor and checks if it is 2.54 multiplied
by some common powers of 10. Currently it checks for mm, cm, dm, m.</p>
<p>See also: <a class="link" href="libgimpbase-gimpunit.html#gimp-unit-get-factor" title="gimp_unit_get_factor ()"><code class="function">gimp_unit_get_factor()</code></a></p>
<div class="refsect3">
<a name="gimp-unit-is-metric.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>unit</p></td>
<td class="parameter_description"><p>The unit</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-unit-is-metric.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the <em class="parameter"><code>unit</code></em>
is metric.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-IS-PARAM-SPEC-UNIT:CAPS"></a><h3>GIMP_IS_PARAM_SPEC_UNIT()</h3>
<pre class="programlisting">#define GIMP_IS_PARAM_SPEC_UNIT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_UNIT))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="gimp-param-spec-unit"></a><h3>gimp_param_spec_unit ()</h3>
<pre class="programlisting"><span class="returnvalue">GParamSpec</span> *
gimp_param_spec_unit (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *nick</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *blurb</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> allow_pixels</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> allow_percent</code></em>,
<em class="parameter"><code><a class="link" href="libgimpbase-gimpunit.html#GimpUnit" title="enum GimpUnit"><span class="type">GimpUnit</span></a> default_value</code></em>,
<em class="parameter"><code><span class="type">GParamFlags</span> flags</code></em>);</pre>
<p>Creates a param spec to hold a units param.
See <code class="function">g_param_spec_internal()</code> for more information.</p>
<div class="refsect3">
<a name="gimp-param-spec-unit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Canonical name of the param</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>nick</p></td>
<td class="parameter_description"><p>Nickname of the param</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>blurb</p></td>
<td class="parameter_description"><p>Brief description of param.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>allow_pixels</p></td>
<td class="parameter_description"><p>Whether "pixels" is an allowed unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>allow_percent</p></td>
<td class="parameter_description"><p>Whether "percent" is an allowed unit.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>default_value</p></td>
<td class="parameter_description"><p>Unit to use if none is assigned.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>a combination of <span class="type">GParamFlags</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-param-spec-unit.returns"></a><h4>Returns</h4>
<p> a newly allocated <span class="type">GParamSpec</span> instance</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-VALUE-HOLDS-UNIT:CAPS"></a><h3>GIMP_VALUE_HOLDS_UNIT()</h3>
<pre class="programlisting">#define GIMP_VALUE_HOLDS_UNIT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_UNIT))
</pre>
</div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GimpUnit"></a><h3>enum GimpUnit</h3>
<p>Units used for dimensions in images.</p>
<div class="refsect3">
<a name="GimpUnit.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PIXEL:CAPS"></a>GIMP_UNIT_PIXEL</p></td>
<td class="enum_member_description">
<p>Pixels</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-INCH:CAPS"></a>GIMP_UNIT_INCH</p></td>
<td class="enum_member_description">
<p>Inches</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-MM:CAPS"></a>GIMP_UNIT_MM</p></td>
<td class="enum_member_description">
<p>Millimeters</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-POINT:CAPS"></a>GIMP_UNIT_POINT</p></td>
<td class="enum_member_description">
<p>Points</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PICA:CAPS"></a>GIMP_UNIT_PICA</p></td>
<td class="enum_member_description">
<p>Picas</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-END:CAPS"></a>GIMP_UNIT_END</p></td>
<td class="enum_member_description">
<p>Marker for end-of-builtin-units</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GIMP-UNIT-PERCENT:CAPS"></a>GIMP_UNIT_PERCENT</p></td>
<td class="enum_member_description">
<p>Pseudo-unit percent</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-TYPE-UNIT:CAPS"></a><h3>GIMP_TYPE_UNIT</h3>
<pre class="programlisting">#define GIMP_TYPE_UNIT (gimp_unit_get_type ())
</pre>
<p><a class="link" href="libgimpbase-gimpunit.html#GIMP-TYPE-UNIT:CAPS" title="GIMP_TYPE_UNIT"><span class="type">GIMP_TYPE_UNIT</span></a> is a <span class="type">GType</span> derived from <span class="type">G_TYPE_INT</span>.</p>
</div>
<hr>
<div class="refsect2">
<a name="GIMP-TYPE-PARAM-UNIT:CAPS"></a><h3>GIMP_TYPE_PARAM_UNIT</h3>
<pre class="programlisting">#define GIMP_TYPE_PARAM_UNIT (gimp_param_unit_get_type ())
</pre>
</div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpunit.see-also"></a><h2>See Also</h2>
<p><span class="type">GimpUnitMenu</span>, <span class="type">GimpSizeEntry</span>.</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
|