-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathhbgd.html
1569 lines (1415 loc) · 119 KB
/
hbgd.html
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
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="referrer" content="origin">
<meta name="viewport" content="initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content">
<meta name="generator" content="hbdoc">
<meta name="keywords" content="Harbour, Clipper, xBase, database, Free Software, GPL, compiler, cross-platform, 32-bit, 64-bit">
<title>Harbour Reference Guide · hbgd lib</title>
<style>
/**
* Minified by jsDelivr using clean-css v4.2.1.
* Original file: /gh/PrismJS/prism@1.17.1/themes/prism-okaidia.css
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#f8f8f2}.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
/*# sourceMappingURL=/sm/40fbac8c090a0ea2949bef662c4dc8f61e9fdf4136e4615ec312d47b6c8d4578.map */
</style>
<link rel="stylesheet" href="hbdoc.css">
<body>
<header>
<svg viewBox="0 0 2260 2260" xmlns="http://www.w3.org/2000/svg">
<path d="m900 1908c137.17-53.265 443.4-77.006 600-52.437-27.114-474.75-34.113-758.18-7.68-1116.3 2.056-27.195 4.283-54.9 6.68-83.245-34.633 68.628-579.45 1206.4-599 1252z"/>
<path d="m1503 297c-123.84 327.12-161.3 844.46-213.46 1389.5-169.5-13.113-449.01 19.795-659.3 108.82 13.528-23.75 771.23-1330.1 872.77-1498.3z"/>
<path d="m1172 1270c-224.3-65.046-473.09 64.996-694 204 153.35-235.43 613.25-936.89 1011-1474-301.51 419.86-317.18 1087.9-317 1270z"/>
<path d="m620.8 2258.7c0.662-1.037 1.36-2.165 2.068-3.191 36.736-55.29 105.69-101.18 205.1-96.72 193.8 8.619 357.24 25.577 652.18 7.207-290.1-9.342-643.35-48.142-1069.1-124.55 105.83 77.98 193.83 195.4 209.76 217.25"/>
<path d="m2259.2 2007.9c-351.83 85.376-1111.3 54.312-2014.2-105.24 59.534 32.024 105.24 68.44 160.57 113.87 884.55 158.71 1465.7 153.54 1808.7 60.37 31.307-22.43 35.385-37.956 44.934-69.006"/>
<path d="m2250.8 1985.6c-316.53 76.867-976 46.6-1793.5-72.332-79.588-11.605-308.23-46.57-445.63-69.063-7.464-15.506-11.282-40.462-11.282-70.79 509.45 68.675 1799.6 275.42 2244 168.26 2.015 12.02 7.115 18.487 6.527 43.929"/>
</svg>
<div>
<div><a href="index.html">Harbour Reference Guide</a></div>
<div>
<nav class="menu">
<nav class="dropdown">
<span class="dropbtn" onclick="">hbgd lib</span>
<nav class="dropdown-content">
<a href="harbour.html">Harbour core</a>
<hr>
<a href="clc53.html">Clipper 5.3</a>
<a href="clct3.html">Clipper Tools 3</a>
<hr>
<a href="gtwvw.html">gtwvw</a>
<a href="hbct.html">hbct</a>
<a href="hbcups.html">hbcups</a>
<a href="hbgd.html">hbgd</a>
<a href="hbgt.html">hbgt</a>
<a href="hbmisc.html">hbmisc</a>
<a href="hbnf.html">hbnf</a>
<a href="hbxpp.html">hbxpp</a>
<a href="hbziparc.html">hbziparc</a>
<a href="rddads.html">rddads</a>
</nav>
</nav>
<nav class="dropdown lang">
<span class="dropbtn lang">EN</span><nav class="dropdown-content lang">
<a href="hbgd.html">EN</a>
<a href="pt-br/index.html">pt-BR</a>
</nav>
</nav>
</nav>
</div>
</div>
</header>
<aside>
<a href="#the-gd-library" title="The GD Library">The GD Library</a>
<a href="#gdimagearc" title="gdImageArc()"><code>gdImageArc()</code></a>
<a href="#gdimagecreate" title="gdImageCreate()"><code>gdImageCreate()</code></a>
<a href="#gdimagecreatefromgd" title="gdImageCreateFromGD()"><code>gdImageCreateFromGD()</code></a>
<a href="#gdimagecreatefromgif" title="gdImageCreateFromGif()"><code>gdImageCreateFromGif()</code></a>
<a href="#gdimagecreatefromjpeg" title="gdImageCreateFromJpeg()"><code>gdImageCreateFromJpeg()</code></a>
<a href="#gdimagecreatefrompng" title="gdImageCreateFromPng()"><code>gdImageCreateFromPng()</code></a>
<a href="#gdimagecreatefromwbmp" title="gdImageCreateFromWBmp()"><code>gdImageCreateFromWBmp()</code></a>
<a href="#gdimagecreatetruecolor" title="gdImageCreateTrueColor()"><code>gdImageCreateTrueColor()</code></a>
<a href="#gdimagedashedline" title="gdImageDashedLine()"><code>gdImageDashedLine()</code></a>
<a href="#gdimagefill" title="gdImageFill()"><code>gdImageFill()</code></a>
<a href="#gdimagefilledarc" title="gdImageFilledArc()"><code>gdImageFilledArc()</code></a>
<a href="#gdimagefilledellipse" title="gdImageFilledEllipse()"><code>gdImageFilledEllipse()</code></a>
<a href="#gdimagefilledpolygon" title="gdImageFilledPolygon()"><code>gdImageFilledPolygon()</code></a>
<a href="#gdimagefilledrectangle" title="gdImageFilledRectangle()"><code>gdImageFilledRectangle()</code></a>
<a href="#gdimagefilltoborder" title="gdImageFillToBorder()"><code>gdImageFillToBorder()</code></a>
<a href="#gdimagegd" title="gdImageGD()"><code>gdImageGD()</code></a>
<a href="#gdimagegif" title="gdImageGif()"><code>gdImageGif()</code></a>
<a href="#gdimagejpeg" title="gdImageJpeg()"><code>gdImageJpeg()</code></a>
<a href="#gdimageline" title="gdImageLine()"><code>gdImageLine()</code></a>
<a href="#gdimageopenpolygon" title="gdImageOpenPolygon()"><code>gdImageOpenPolygon()</code></a>
<a href="#gdimagepng" title="gdImagePng()"><code>gdImagePng()</code></a>
<a href="#gdimagepolygon" title="gdImagePolygon()"><code>gdImagePolygon()</code></a>
<a href="#gdimagerectangle" title="gdImageRectangle()"><code>gdImageRectangle()</code></a>
<a href="#gdimagesetantialiased" title="gdImageSetAntiAliased()"><code>gdImageSetAntiAliased()</code></a>
<a href="#gdimagesetantialiaseddontblend" title="gdImageSetAntiAliasedDontBlend()"><code>gdImageSetAntiAliasedDontBlend()</code></a>
<a href="#gdimagesetbrush" title="gdImageSetBrush()"><code>gdImageSetBrush()</code></a>
<a href="#gdimagesetpixel" title="gdImageSetPixel()"><code>gdImageSetPixel()</code></a>
<a href="#gdimagesetstyle" title="gdImageSetStyle()"><code>gdImageSetStyle()</code></a>
<a href="#gdimagesetthickness" title="gdImageSetThickness()"><code>gdImageSetThickness()</code></a>
<a href="#gdimagesettile" title="gdImageSetTile()"><code>gdImageSetTile()</code></a>
<a href="#gdimagewbmp" title="gdImageWBmp()"><code>gdImageWBmp()</code></a>
</aside>
<main>
<section>
<h4><a href="#the-gd-library" class="d-id" id="the-gd-library" title="∞">The GD Library</a><span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Read me file for GD Library</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>HBGD</code> is basically a wrapper of Thomas Boutell's GD Library version 2.x. GD Library is a powerful graphic library very useful especially under CGI environment.</div>
<div><p><code>HBGD</code> actually contains almost all GD functions, more a set of functions that extends original library and a set of classes that make easier to work with this library.</div>
<div><p>Thomas Boutell's GD library actually supports these graphic formats: PNG, JPEG, GIF, Animated GIF, GD, GD2, WBMP, XBM, <code>XPM WBMP</code> is Wireless Bitmap, not Windows Bitmap, and it is used for WAP. It is a B&W bitmap.</div>
<div><p><code>HBGD</code> actually supports PNG, JPEG, GIF, GD, WBMP The other Animated GIF, GD2, XBM and XPM are not wrapped actually.</div>
<div><p>Using this library you can, as a little example: - create an image in memory, true color or with a 256 colors palette; - load and save an image of above formats and convert it to another supported format; - draw dots, lines, dashed lines, polygons, rectangles, arcs, circles and ellipses; - fill with colors; - draw with brushes; - check a point or part or full image with a lot of query functions; - draw characters and words with internal fonts or using TrueType fonts; - write strings on a base line or on a circle line and with any angle degree; - copy, resize and rotate part or full image;</div>
<div><p>and, over this, some functions to clone, crop, zoom, rotate outside and inside.</div>
<div><p>The prefix for all functions is GD (i.e. <code><a href="#gdimagecreate">gdImageCreate()</a></code> )</div>
<div><p>You can use directly all API functions or TGD class.</div>
<div><p>NOTE: Not all functions are wrapped.</div>
</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">Document</div>
<div class="d-d">See also</div>
<div class="d-it"><code>GDChart Class</code>, <code>GDImage Class</code></div>
</section>
<section>
<h4><a href="#gdimagearc" class="d-id" id="gdimagearc" title="∞"><code>gdImageArc()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L857" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageArc">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageArc">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a partial ellipse centered at a given point.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageArc( <pImage>, <cx>, <cy>, <w>, <h>, <s>, <e>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>cx</code> - center point horizontal position <code>cy</code> - center point vertical position <code>w</code> - width <code>h</code> - height <code>s</code> - start degree <code>e</code> - end degree <code>nColor</code> - Color index</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageArc()</code> is used to draw a partial ellipse centered at the given point, with the specified width and height in pixels. The arc begins at the position in degrees specified by s and ends at the position specified by e. The arc is drawn in the color specified by the last argument. A circle can be drawn by beginning from 0 degrees and ending at 360 degrees, with width and height being equal. <code>e</code> must be greater than <code>s</code>. Values greater than 360 are interpreted modulo 360.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw an ellipse
gdImageArc( pImage, 50, 25, 98, 48, 0, 360, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreate" class="d-id" id="gdimagecreate" title="∞"><code>gdImageCreate()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L504" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreate">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreate">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Create a palette-based image in memory with no more that 256 colors.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreate( <nPixelWidth>, <nPixelHeight> ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>nPixelWidth</code> - image width <code>nPixelHeight</code> - image height</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreate()</code> creates an empty image in memory. This image has no more than 256 colors.</div>
<div><p><code>gdImageCreate()</code> returns an image pointer or <code>NIL</code> if unable to create the image.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreate( 64, 64 )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatefromgd" class="d-id" id="gdimagecreatefromgd" title="∞"><code>gdImageCreateFromGD()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L557" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateFromGD">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateFromGD">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Load a GD image file.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateFromGD( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>pPointer</code> - Memory image pointer <code>nSize</code> - Image size</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateFromGD()</code> creates a GD image from a file or a handle or another image in memory.</div>
<div><p>You can use one of 3 syntax:</div>
<pre><code class="language-c">pImage := gdImageCreateFromGD( "myimage.gd" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromGD( nFileHandle, nSize )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromGD( pMemoryImagePtr, nSize )
</code></pre>
<div><p> the <code>pImage</code> pointer returned will be not <code>NIL</code> if successful and will contains a memory pointer to the GD image.</div>
<div><p><code>HBGD</code> uses it's own memory to manage an image, so it is important to use this function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromGD( "myimage.gd" )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code>, <code><a href="#gdimagecreatefromjpeg">gdImageCreateFromJpeg()</a></code>, <code><a href="#gdimagecreatefrompng">gdImageCreateFromPng()</a></code>, <code><a href="#gdimagecreatefromwbmp">gdImageCreateFromWBmp()</a></code>, <code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatefromgif" class="d-id" id="gdimagecreatefromgif" title="∞"><code>gdImageCreateFromGif()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L536" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateFromGif">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateFromGif">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Load a GIF image file.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateFromGif( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>pPointer</code> - Memory image pointer <code>nSize</code> - Image size</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateFromGif()</code> creates a GIF image from a file or a handle or another image in memory.</div>
<div><p>You can use one of 3 syntax:</div>
<pre><code class="language-c">pImage := gdImageCreateFromGif( "myimage.gif" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromGif( nFileHandle, nSize )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromGif( pMemoryImagePtr, nSize )
</code></pre>
<div><p> the <code>pImage</code> pointer returned will be not <code>NIL</code> if successful and will contains a memory pointer to the gif image.</div>
<div><p><code>HBGD</code> uses it's own memory to manage an image, so it is important to use this function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromGif( "myimage.gif" )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagecreatefromgd">gdImageCreateFromGD()</a></code>, <code><a href="#gdimagecreatefromjpeg">gdImageCreateFromJpeg()</a></code>, <code><a href="#gdimagecreatefrompng">gdImageCreateFromPng()</a></code>, <code><a href="#gdimagecreatefromwbmp">gdImageCreateFromWBmp()</a></code>, <code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatefromjpeg" class="d-id" id="gdimagecreatefromjpeg" title="∞"><code>gdImageCreateFromJpeg()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L529" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateFromJpeg">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateFromJpeg">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Load a JPEG image file.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateFromJpeg( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>pPointer</code> - Memory image pointer <code>nSize</code> - Image size</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateFromJpeg()</code> creates a JPEG image from a file or a handle or another image in memory.</div>
<div><p>You can use one of 3 syntax:</div>
<pre><code class="language-c">pImage := gdImageCreateFromJpeg( "myimage.jpg" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromJpeg( nFileHandle, nSize )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromJpeg( pMemoryImagePtr, nSize )
</code></pre>
<div><p> the <code>pImage</code> pointer returned will be not <code>NIL</code> if successful and will contains a memory pointer to the JPEG image.</div>
<div><p><code>HBGD</code> uses it's own memory to manage an image, so it is important to use this function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromJpeg( "myimage.jpg" )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagecreatefromgd">gdImageCreateFromGD()</a></code>, <code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code>, <code><a href="#gdimagecreatefrompng">gdImageCreateFromPng()</a></code>, <code><a href="#gdimagecreatefromwbmp">gdImageCreateFromWBmp()</a></code>, <code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatefrompng" class="d-id" id="gdimagecreatefrompng" title="∞"><code>gdImageCreateFromPng()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L543" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateFromPng">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateFromPng">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Load a PNG image file.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateFromPng( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>pPointer</code> - Memory image pointer <code>nSize</code> - Image size</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateFromPng()</code> creates a PNG image from a file or a handle or another image in memory.</div>
<div><p>You can use one of 3 syntax:</div>
<pre><code class="language-c">pImage := gdImageCreateFromPng( "myimage.png" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromPng( nFileHandle, nSize )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromPng( pMemoryImagePtr, nSize )
</code></pre>
<div><p> the <code>pImage</code> pointer returned will be not <code>NIL</code> if successful and will contains a memory pointer to the png image.</div>
<div><p><code>HBGD</code> uses it's own memory to manage an image, so it is important to use this function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromPng( "myimage.png" )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagecreatefromgd">gdImageCreateFromGD()</a></code>, <code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code>, <code><a href="#gdimagecreatefromjpeg">gdImageCreateFromJpeg()</a></code>, <code><a href="#gdimagecreatefromwbmp">gdImageCreateFromWBmp()</a></code>, <code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatefromwbmp" class="d-id" id="gdimagecreatefromwbmp" title="∞"><code>gdImageCreateFromWBmp()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L550" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateFromWBmp">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateFromWBmp">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Load a WBMP image file.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateFromWBmp( <cFile> | <nHandle> | <pPointer> [, <nSize> ] ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>pPointer</code> - Memory image pointer <code>nSize</code> - Image size</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateFromWBmp()</code> creates a WBMP image from a file or a handle or another image in memory.</div>
<div><p>You can use one of 3 syntax:</div>
<pre><code class="language-c">pImage := gdImageCreateFromWBmp( "myimage.wbmp" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromWBmp( nFileHandle, nSize )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">pImage := gdImageCreateFromWBmp( pMemoryImagePtr, nSize )
</code></pre>
<div><p> the <code>pImage</code> pointer returned will be not <code>NIL</code> if successful and will contains a memory pointer to the WBMP image.</div>
<div><p><code>HBGD</code> uses it's own memory to manage an image, so it is important to use this function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromWBmp( "myimage.wbmp" )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagecreatefromgd">gdImageCreateFromGD()</a></code>, <code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code>, <code><a href="#gdimagecreatefromjpeg">gdImageCreateFromJpeg()</a></code>, <code><a href="#gdimagecreatefrompng">gdImageCreateFromPng()</a></code>, <code><a href="#gdimagecreatetruecolor">gdImageCreateTrueColor()</a></code></div>
</section>
<section>
<h4><a href="#gdimagecreatetruecolor" class="d-id" id="gdimagecreatetruecolor" title="∞"><code>gdImageCreateTrueColor()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L517" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageCreateTrueColor">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageCreateTrueColor">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Create a true color image in memory.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageCreateTrueColor( <nPixelWidth>, <nPixelHeight> ) → pImage</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>nPixelWidth</code> - image width <code>nPixelHeight</code> - image height</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>pImage</code> - Image pointer</div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageCreateTrueColor()</code> creates an empty image in memory. This image has true colors.</div>
<div><p><code>gdImageCreateTrueColor()</code> returns an image pointer or <code>NIL</code> if unable to create the image.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateTrueColor( 64, 64 )
// Use image here
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreate">gdImageCreate()</a></code></div>
</section>
<section>
<h4><a href="#gdimagedashedline" class="d-id" id="gdimagedashedline" title="∞"><code>gdImageDashedLine()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L651" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageDashedLine">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageDashedLine">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a dashed line between two end points (x1, y1 and x2, y2) with a particular color index.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageDashedLine( <pImage>, <x1>, <y1>, <x2>, <y2>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>x1</code> - 1st point horizontal position <code>y1</code> - 1st point vertical position <code>x2</code> - 2nd point horizontal position <code>y2</code> - 2nd point vertical position <code>nColor</code> - Color index</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageDashedLine()</code> Draws a dashed line between two end points (x1, y1 and x2, y2) with a particular color index.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw a dashed line
gdImageDashedLine( pImage, 10, 10, 90, 90, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefill" class="d-id" id="gdimagefill" title="∞"><code>gdImageFill()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L985" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFill">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFill">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">floods a portion of the image with the specified color.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageFill( <pImage>, <x>, <y>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>x</code> - start point horizontal position <code>y</code> - start point vertical position <code>nColor</code> - Color index of filling color</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFill()</code> floods a portion of the image with the specified color, beginning at the specified point and flooding the surrounding region of the same color as the starting point. For a way of flooding a region defined by a specific border color rather than by its interior color, see <code><a href="#gdimagefilltoborder">gdImageFillToBorder()</a></code>. The fill color can be <code>gdTiled</code>, resulting in a tile fill using another image as the tile. However, the tile image cannot be transparent. If the image you wish to fill with has a transparent color index, call <code>gdImageTransparent()</code> on the tile image and set the transparent color index to -1 to turn off its transparency.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue, red
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
red := gdImageColorAllocate( pImage, 255, 0, 0 )
// Draw an ellipse
gdImageArc( pImage, 50, 25, 98, 48, 0, 360, blue )
// Fill the ellipse
gdImageFill( pImage, 50, 50, red )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagearc">gdImageArc()</a></code>, <code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefilledarc" class="d-id" id="gdimagefilledarc" title="∞"><code>gdImageFilledArc()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L884" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFilledArc">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFilledArc">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a partial filled ellipse centered at a given point.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageArc( <pImage>, <cx>, <cy>, <w>, <h>, <s>, <e>, <nColor>, <nStyle> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>cx</code> - center point horizontal position <code>cy</code> - center point vertical position <code>w</code> - width <code>h</code> - height <code>s</code> - start degree <code>e</code> - end degree <code>nColor</code> - Color index <code>nStyle</code> - fill style</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFilledArc()</code> is used to draw a partial ellipse centered at the given point, with the specified width and height in pixels. The arc begins at the position in degrees specified by s and ends at the position specified by e. The arc is drawn in the color specified by the last argument. A circle can be drawn by beginning from 0 degrees and ending at 360 degrees, with width and height being equal. <code>e</code> must be greater than <code>s</code>. Values greater than 360 are interpreted modulo 360.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
<div><p>Last parameter <code>nStyle</code> is a bitwise OR of the following possibilities:</div>
<div class="d-t d-t0">
<div>gdArc</div>
<div>gdChord</div>
<div>gdPie (synonym for gdArc)</div>
<div>gdNoFill</div>
<div>gdEdged</div>
</div>
<div><p><code>gdArc</code> and <code>gdChord</code> are mutually exclusive; <code>gdChord</code> just connects the starting and ending angles with a straight line, while <code>gdArc</code> produces a rounded edge. <code>gdPie</code> is a synonym for <code>gdArc</code>. <code>gdNoFill</code> indicates that the arc or chord should be outlined, not filled. <code>gdEdged</code>, used together with <code>gdNoFill</code>, indicates that the beginning and ending angles should be connected to the center; this is a good way to outline (rather than fill) a 'pie slice'</div>
<div><p>these constants are defined in <code><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gd.ch">gd.ch</a></code></div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">#include "gd.ch"
LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw an ellipse
gdImageFilledArc( pImage, 50, 25, 98, 48, 0, 360, blue, gdArc )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefilledellipse" class="d-id" id="gdimagefilledellipse" title="∞"><code>gdImageFilledEllipse()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L912" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFilledEllipse">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFilledEllipse">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a filled ellipse centered at a given point.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageFilledEllipse( <pImage>, <cx>, <cy>, <w>, <h>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>cx</code> - center point horizontal position <code>cy</code> - center point vertical position <code>w</code> - width <code>h</code> - height <code>nColor</code> - Color index</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFilledEllipse()</code> is used to draw a filled ellipse centered at the given point, with the specified width and height in pixels.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw an ellipse
gdImageFilledEllipse( pImage, 50, 25, 98, 48, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefilledpolygon" class="d-id" id="gdimagefilledpolygon" title="∞"><code>gdImageFilledPolygon()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L791" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFilledPolygon">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFilledPolygon">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a filled polygon with vertices (at least 3) with a particular color index.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageFilledPolygon( <pImage>, <aVertices>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>pImage</code> - Image pointer <code>aVertices</code> - Array of point array { <code>x</code>, <code>y</code> } where</div>
<div><code>x</code> is horizontal position <code>y</code> is vertical position</div>
<div><code>nColor</code> - Color index</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFilledPolygon()</code> Draws a filled polygon with vertices (at least 3) with a particular color index.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
LOCAL aVertices := { ;
{ 50, 0 }, ;
{ 99, 99 }, ;
{ 0, 99 } }
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw a filled polygon
gdImageFilledPolygon( pImage, aVertices, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefilledrectangle" class="d-id" id="gdimagefilledrectangle" title="∞"><code>gdImageFilledRectangle()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L834" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFilledRectangle">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFilledRectangle">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a filled rectangle with a particular color index.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageFilledRectangle( <pImage>, <x1>, <y1>, <x2>, <y2>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>x1</code> - upper left point horizontal position <code>y1</code> - upper left point vertical position <code>x2</code> - lower right point horizontal position <code>y2</code> - lower right point vertical position <code>nColor</code> - Color index</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFilledRectangle()</code> draws a filled rectangle between 2 points with a particular color index.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw a filled rectangle
gdImageFilledRectangle( pImage, 10, 10, 50, 50, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagefilltoborder" class="d-id" id="gdimagefilltoborder" title="∞"><code>gdImageFillToBorder()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L935" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageFillToBorder">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageFillToBorder">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">floods a portion of the image with the specified color.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageFillToBorder( <pImage>, <x>, <y>, <nBorder>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>x</code> - start point horizontal position <code>y</code> - start point vertical position <code>nBorder</code> - Color index where fill stops <code>nColor</code> - Color index of filling color</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageFillToBorder()</code> floods a portion of the image with the specified color, beginning at the specified point and stopping at the specified border color. For a way of flooding an area defined by the color of the starting point, see <code><a href="#gdimagefill">gdImageFill()</a></code>.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue, red
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
red := gdImageColorAllocate( pImage, 255, 0, 0 )
// Draw an ellipse
gdImageArc( pImage, 50, 25, 98, 48, 0, 360, blue )
// Fill the ellipse
gdImageFillToBorder( pImage, 50, 50, blue, red )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagearc">gdImageArc()</a></code>, <code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagegd" class="d-id" id="gdimagegd" title="∞"><code>gdImageGD()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L592" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageGD">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageGD">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Save a GD image.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageGD( <pImage>, <cFile> | <nHandle> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>cFile</code> - Image file name <code>nHandle</code> - File handle</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageGD()</code> saves a GD image to a file or a handle.</div>
<div><p>You can use one of 2 syntax:</div>
<pre><code class="language-c">gdImageGD( pImage, "myimage.gd" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">gdImageGD( pImage, nFileHandle )
</code></pre>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromGif( "myimage.gif" )
// Image conversion
gdImageGD( pImage, "myimage.gd" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code></div>
</section>
<section>
<h4><a href="#gdimagegif" class="d-id" id="gdimagegif" title="∞"><code>gdImageGif()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L571" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageGif">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageGif">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Save a GIF image.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageGif( <pImage>, <cFile> | <nHandle> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>cFile</code> - Image file name <code>nHandle</code> - File handle</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageGif()</code> saves a GIF image to a file or a handle.</div>
<div><p>You can use one of 2 syntax:</div>
<pre><code class="language-c">gdImageGif( pImage, "myimage.gif" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">gdImageGif( pImage, nFileHandle )
</code></pre>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromJpeg( "myimage.jpg" )
// Image conversion
gdImageGif( pImage, "myimage.gif" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreatefromjpeg">gdImageCreateFromJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagejpeg" class="d-id" id="gdimagejpeg" title="∞"><code>gdImageJpeg()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L564" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageJpeg">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageJpeg">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Save a JPEG image.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageJpeg( <pImage>, <cFile> | <nHandle> [, <nCompressionLevel> ] ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>pImage</code> - Image pointer <code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>nCompressionLevel</code> - a numeric value between 0=max compression and 95=min compression (best quality)</div>
<div>default is -1=auto</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageJpeg()</code> saves a JPEG image to a file or a handle.</div>
<div><p>You can use one of 2 syntax:</div>
<pre><code class="language-c">gdImageJpeg( pImage, "myimage.jpg" )
</code></pre>
<div><p> or</div>
<pre><code class="language-c">gdImageJpeg( pImage, nFileHandle )
</code></pre>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage := gdImageCreateFromGif( "myimage.gif" )
// Image conversion
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code><a href="#gdimagecreatefromgif">gdImageCreateFromGif()</a></code></div>
</section>
<section>
<h4><a href="#gdimageline" class="d-id" id="gdimageline" title="∞"><code>gdImageLine()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L628" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageLine">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageLine">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws a line between two end points (x1, y1 and x2, y2) with a particular color index.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageLine( <pImage>, <x1>, <y1>, <x2>, <y2>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it"><code>pImage</code> - Image pointer <code>x1</code> - 1st point horizontal position <code>y1</code> - 1st point vertical position <code>x2</code> - 2nd point horizontal position <code>y2</code> - 2nd point vertical position <code>nColor</code> - Color index</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageLine()</code> Draws a line between two end points (x1, y1 and x2, y2) with a particular color index.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draw a line
gdImageLine( pImage, 10, 10, 90, 90, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimageopenpolygon" class="d-id" id="gdimageopenpolygon" title="∞"><code>gdImageOpenPolygon()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L721" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImageOpenPolygon">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImageOpenPolygon">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Draws an open polygon with vertices (at least 3) with a particular color index.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImageOpenPolygon( <pImage>, <aVertices>, <nColor> ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>pImage</code> - Image pointer <code>aVertices</code> - Array of point array { <code>x</code>, <code>y</code> } where</div>
<div><code>x</code> is horizontal position <code>y</code> is vertical position</div>
<div><code>nColor</code> - Color index</div>
</div>
<div class="d-d">Returns</div>
<div class="d-it"><code>NIL</code></div>
<div class="d-d">Description</div>
<div class="d-it">
<div><p><code>gdImageOpenPolygon()</code> Draws an open polygon with vertices (at least 3) with a particular color index. Unlike <code><a href="#gdimagepolygon">gdImagePolygon()</a></code> the endpoints of the line sequence are not connected to close the polygon.</div>
<div><p>To set the color index you have to use <code>gdImageColorAllocate()</code> function.</div>
</div>
<div class="d-d">Examples</div>
<section class="d-ex"><div class="playground"><pre contenteditable="true" spellcheck="false"><code class="language-c">LOCAL pImage
LOCAL blue
LOCAL aVertices := { ;
{ 50, 0 }, ;
{ 99, 99 }, ;
{ 0, 99 } }
// Create an image in memory
pImage := gdImageCreate( 100, 100 )
// Allocate color
blue := gdImageColorAllocate( pImage, 0, 0, 255 )
// Draws an open polygon
gdImageOpenPolygon( pImage, aVertices, blue )
// Save the image
gdImageJpeg( pImage, "myimage.jpg" )
</code></pre></div></section>
<div class="d-d">Status</div>
<div class="d-it">Ready</div>
<div class="d-d">Compliance</div>
<div class="d-it">Not applicable</div>
<div class="d-d">Platforms</div>
<div class="d-it">Available on all platforms</div>
<div class="d-d">Tag</div>
<div class="d-it">hbgd</div>
<div class="d-d">See also</div>
<div class="d-it"><code>gdImageColorAllocate()</code>, <code><a href="#gdimagecreate">gdImageCreate()</a></code>, <code><a href="#gdimagejpeg">gdImageJpeg()</a></code></div>
</section>
<section>
<h4><a href="#gdimagepng" class="d-id" id="gdimagepng" title="∞"><code>gdImagePng()</code></a><a href="https://github.com/vszakats/hb/blob/096e855/contrib/hbgd/gdwrp.c#L578" class="d-so" title="contrib/hbgd/gdwrp.c">Source code</a><span class="d-so"><nav class="dropdown d-ebi">🔎<nav class="dropdown-content d-dd"><a href="https://github.com/vszakats/hb/search?type=Code&q=gdImagePng">in Repository</a><a href="https://google.com/search?q=site:groups.google.com/d/msg/harbour+gdImagePng">in Discussions</a></nav></nav></span>
<span class="d-eb"><a href="#" title="Top" class="d-ebi">⌃</a> | <a href="index.html" title="Index" class="d-ebi">☰</a> | <a href="https://github.com/vszakats/hb/edit/main/contrib/hbgd/doc/en/gdwrp.txt">Improve this doc</a></span></h4>
<div class="d-ol">Save a PNG image.</div>
<div class="d-d">Syntax</div>
<div class="d-sy"><pre><code>gdImagePng( <pImage>, <cFile> | <nHandle> [, <nCompressionLevel> ] ) → NIL</code></pre></div>
<div class="d-d">Arguments</div>
<div class="d-it">
<div><code>pImage</code> - Image pointer <code>cFile</code> - Image file name <code>nHandle</code> - File handle <code>nCompressionLevel</code> - a numeric value between 0=no compression and 9=max compression</div>
<div>default is -1=auto</div>
</div>
<div class="d-d">Returns</div>