-
Notifications
You must be signed in to change notification settings - Fork 4
/
cairo.go
2764 lines (2431 loc) · 111 KB
/
cairo.go
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
// THE AUTOGENERATED LICENSE. ALL THE RIGHTS ARE RESERVED BY ROBOTS.
// WARNING: This file has automatically been generated on Thu, 11 Jan 2018 16:22:52 MSK.
// By https://git.io/c-for-go. DO NOT EDIT.
package cairo
/*
#include "include/cairo.h"
#include <stdlib.h>
#include "cgo_helpers.h"
*/
import "C"
import (
"runtime"
"unsafe"
)
// GetVersion function as declared in include/cairo.h:86
func GetVersion() int32 {
__ret := C.cairo_version()
__v := (int32)(__ret)
return __v
}
// VersionString function as declared in include/cairo.h:88
func VersionString() string {
__ret := C.cairo_version_string()
__v := packPCharString(__ret)
return __v
}
// Create function as declared in include/cairo.h:490
func Create(target *Surface) *Cairo {
ctarget, _ := (*C.cairo_surface_t)(unsafe.Pointer(target)), cgoAllocsUnknown
__ret := C.cairo_create(ctarget)
__v := *(**Cairo)(unsafe.Pointer(&__ret))
return __v
}
// Reference function as declared in include/cairo.h:493
func Reference(cr *Cairo) *Cairo {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_reference(ccr)
__v := *(**Cairo)(unsafe.Pointer(&__ret))
return __v
}
// Destroy function as declared in include/cairo.h:497
func Destroy(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_destroy(ccr)
}
// GetReferenceCount function as declared in include/cairo.h:500
func GetReferenceCount(cr *Cairo) uint32 {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_get_reference_count(ccr)
__v := (uint32)(__ret)
return __v
}
// GetUserData function as declared in include/cairo.h:502
func GetUserData(cr *Cairo, key *UserDataKey) unsafe.Pointer {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
ckey, _ := key.PassRef()
__ret := C.cairo_get_user_data(ccr, ckey)
__v := *(*unsafe.Pointer)(unsafe.Pointer(&__ret))
return __v
}
// SetUserData function as declared in include/cairo.h:507
func SetUserData(cr *Cairo, key *UserDataKey, userData unsafe.Pointer, destroy DestroyFunc) Status {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
ckey, _ := key.PassRef()
cuserData, _ := userData, cgoAllocsUnknown
cdestroy, _ := destroy.PassValue()
__ret := C.cairo_set_user_data(ccr, ckey, cuserData, cdestroy)
__v := (Status)(__ret)
return __v
}
// Save function as declared in include/cairo.h:513
func Save(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_save(ccr)
}
// Restore function as declared in include/cairo.h:516
func Restore(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_restore(ccr)
}
// PushGroup function as declared in include/cairo.h:519
func PushGroup(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_push_group(ccr)
}
// PushGroupWithContent function as declared in include/cairo.h:522
func PushGroupWithContent(cr *Cairo, content Content) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
ccontent, _ := (C.cairo_content_t)(content), cgoAllocsUnknown
C.cairo_push_group_with_content(ccr, ccontent)
}
// PopGroup function as declared in include/cairo.h:524
func PopGroup(cr *Cairo) *Pattern {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_pop_group(ccr)
__v := *(**Pattern)(unsafe.Pointer(&__ret))
return __v
}
// PopGroupToSource function as declared in include/cairo.h:528
func PopGroupToSource(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_pop_group_to_source(ccr)
}
// SetOperator function as declared in include/cairo.h:650
func SetOperator(cr *Cairo, op Operator) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cop, _ := (C.cairo_operator_t)(op), cgoAllocsUnknown
C.cairo_set_operator(ccr, cop)
}
// SetSource function as declared in include/cairo.h:653
func SetSource(cr *Cairo, source *Pattern) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
csource, _ := (*C.cairo_pattern_t)(unsafe.Pointer(source)), cgoAllocsUnknown
C.cairo_set_source(ccr, csource)
}
// SetSourceRgb function as declared in include/cairo.h:656
func SetSourceRgb(cr *Cairo, red float64, green float64, blue float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cred, _ := (C.double)(red), cgoAllocsUnknown
cgreen, _ := (C.double)(green), cgoAllocsUnknown
cblue, _ := (C.double)(blue), cgoAllocsUnknown
C.cairo_set_source_rgb(ccr, cred, cgreen, cblue)
}
// SetSourceRgba function as declared in include/cairo.h:659
func SetSourceRgba(cr *Cairo, red float64, green float64, blue float64, alpha float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cred, _ := (C.double)(red), cgoAllocsUnknown
cgreen, _ := (C.double)(green), cgoAllocsUnknown
cblue, _ := (C.double)(blue), cgoAllocsUnknown
calpha, _ := (C.double)(alpha), cgoAllocsUnknown
C.cairo_set_source_rgba(ccr, cred, cgreen, cblue, calpha)
}
// SetSourceSurface function as declared in include/cairo.h:664
func SetSourceSurface(cr *Cairo, surface *Surface, x float64, y float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
csurface, _ := (*C.cairo_surface_t)(unsafe.Pointer(surface)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
C.cairo_set_source_surface(ccr, csurface, cx, cy)
}
// SetTolerance function as declared in include/cairo.h:670
func SetTolerance(cr *Cairo, tolerance float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
ctolerance, _ := (C.double)(tolerance), cgoAllocsUnknown
C.cairo_set_tolerance(ccr, ctolerance)
}
// SetAntialias function as declared in include/cairo.h:724
func SetAntialias(cr *Cairo, antialias Antialias) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cantialias, _ := (C.cairo_antialias_t)(antialias), cgoAllocsUnknown
C.cairo_set_antialias(ccr, cantialias)
}
// SetFillRule function as declared in include/cairo.h:759
func SetFillRule(cr *Cairo, fillRule FillRule) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cfillRule, _ := (C.cairo_fill_rule_t)(fillRule), cgoAllocsUnknown
C.cairo_set_fill_rule(ccr, cfillRule)
}
// SetLineWidth function as declared in include/cairo.h:762
func SetLineWidth(cr *Cairo, width float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cwidth, _ := (C.double)(width), cgoAllocsUnknown
C.cairo_set_line_width(ccr, cwidth)
}
// SetLineCap function as declared in include/cairo.h:783
func SetLineCap(cr *Cairo, lineCap LineCap) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
clineCap, _ := (C.cairo_line_cap_t)(lineCap), cgoAllocsUnknown
C.cairo_set_line_cap(ccr, clineCap)
}
// SetLineJoin function as declared in include/cairo.h:807
func SetLineJoin(cr *Cairo, lineJoin LineJoin) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
clineJoin, _ := (C.cairo_line_join_t)(lineJoin), cgoAllocsUnknown
C.cairo_set_line_join(ccr, clineJoin)
}
// SetDash function as declared in include/cairo.h:810
func SetDash(cr *Cairo, dashes *float64, numDashes int32, offset float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdashes, _ := (*C.double)(unsafe.Pointer(dashes)), cgoAllocsUnknown
cnumDashes, _ := (C.int)(numDashes), cgoAllocsUnknown
coffset, _ := (C.double)(offset), cgoAllocsUnknown
C.cairo_set_dash(ccr, cdashes, cnumDashes, coffset)
}
// SetMiterLimit function as declared in include/cairo.h:816
func SetMiterLimit(cr *Cairo, limit float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
climit, _ := (C.double)(limit), cgoAllocsUnknown
C.cairo_set_miter_limit(ccr, climit)
}
// Translate function as declared in include/cairo.h:819
func Translate(cr *Cairo, tx float64, ty float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
ctx, _ := (C.double)(tx), cgoAllocsUnknown
cty, _ := (C.double)(ty), cgoAllocsUnknown
C.cairo_translate(ccr, ctx, cty)
}
// Scale function as declared in include/cairo.h:822
func Scale(cr *Cairo, sx float64, sy float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
csx, _ := (C.double)(sx), cgoAllocsUnknown
csy, _ := (C.double)(sy), cgoAllocsUnknown
C.cairo_scale(ccr, csx, csy)
}
// Rotate function as declared in include/cairo.h:825
func Rotate(cr *Cairo, angle float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cangle, _ := (C.double)(angle), cgoAllocsUnknown
C.cairo_rotate(ccr, cangle)
}
// Transform function as declared in include/cairo.h:828
func Transform(cr *Cairo, matrix *Matrix) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cmatrix, _ := matrix.PassRef()
C.cairo_transform(ccr, cmatrix)
}
// SetMatrix function as declared in include/cairo.h:832
func SetMatrix(cr *Cairo, matrix *Matrix) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cmatrix, _ := matrix.PassRef()
C.cairo_set_matrix(ccr, cmatrix)
}
// IdentityMatrix function as declared in include/cairo.h:836
func IdentityMatrix(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_identity_matrix(ccr)
}
// UserToDevice function as declared in include/cairo.h:839
func UserToDevice(cr *Cairo, x *float64, y *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (*C.double)(unsafe.Pointer(x)), cgoAllocsUnknown
cy, _ := (*C.double)(unsafe.Pointer(y)), cgoAllocsUnknown
C.cairo_user_to_device(ccr, cx, cy)
}
// UserToDeviceDistance function as declared in include/cairo.h:842
func UserToDeviceDistance(cr *Cairo, dx *float64, dy *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdx, _ := (*C.double)(unsafe.Pointer(dx)), cgoAllocsUnknown
cdy, _ := (*C.double)(unsafe.Pointer(dy)), cgoAllocsUnknown
C.cairo_user_to_device_distance(ccr, cdx, cdy)
}
// DeviceToUser function as declared in include/cairo.h:845
func DeviceToUser(cr *Cairo, x *float64, y *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (*C.double)(unsafe.Pointer(x)), cgoAllocsUnknown
cy, _ := (*C.double)(unsafe.Pointer(y)), cgoAllocsUnknown
C.cairo_device_to_user(ccr, cx, cy)
}
// DeviceToUserDistance function as declared in include/cairo.h:848
func DeviceToUserDistance(cr *Cairo, dx *float64, dy *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdx, _ := (*C.double)(unsafe.Pointer(dx)), cgoAllocsUnknown
cdy, _ := (*C.double)(unsafe.Pointer(dy)), cgoAllocsUnknown
C.cairo_device_to_user_distance(ccr, cdx, cdy)
}
// NewPath function as declared in include/cairo.h:852
func NewPath(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_new_path(ccr)
}
// MoveTo function as declared in include/cairo.h:855
func MoveTo(cr *Cairo, x float64, y float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
C.cairo_move_to(ccr, cx, cy)
}
// NewSubPath function as declared in include/cairo.h:858
func NewSubPath(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_new_sub_path(ccr)
}
// LineTo function as declared in include/cairo.h:861
func LineTo(cr *Cairo, x float64, y float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
C.cairo_line_to(ccr, cx, cy)
}
// CurveTo function as declared in include/cairo.h:864
func CurveTo(cr *Cairo, x1 float64, y1 float64, x2 float64, y2 float64, x3 float64, y3 float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx1, _ := (C.double)(x1), cgoAllocsUnknown
cy1, _ := (C.double)(y1), cgoAllocsUnknown
cx2, _ := (C.double)(x2), cgoAllocsUnknown
cy2, _ := (C.double)(y2), cgoAllocsUnknown
cx3, _ := (C.double)(x3), cgoAllocsUnknown
cy3, _ := (C.double)(y3), cgoAllocsUnknown
C.cairo_curve_to(ccr, cx1, cy1, cx2, cy2, cx3, cy3)
}
// Arc function as declared in include/cairo.h:870
func Arc(cr *Cairo, xc float64, yc float64, radius float64, angle1 float64, angle2 float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cxc, _ := (C.double)(xc), cgoAllocsUnknown
cyc, _ := (C.double)(yc), cgoAllocsUnknown
cradius, _ := (C.double)(radius), cgoAllocsUnknown
cangle1, _ := (C.double)(angle1), cgoAllocsUnknown
cangle2, _ := (C.double)(angle2), cgoAllocsUnknown
C.cairo_arc(ccr, cxc, cyc, cradius, cangle1, cangle2)
}
// ArcNegative function as declared in include/cairo.h:876
func ArcNegative(cr *Cairo, xc float64, yc float64, radius float64, angle1 float64, angle2 float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cxc, _ := (C.double)(xc), cgoAllocsUnknown
cyc, _ := (C.double)(yc), cgoAllocsUnknown
cradius, _ := (C.double)(radius), cgoAllocsUnknown
cangle1, _ := (C.double)(angle1), cgoAllocsUnknown
cangle2, _ := (C.double)(angle2), cgoAllocsUnknown
C.cairo_arc_negative(ccr, cxc, cyc, cradius, cangle1, cangle2)
}
// RelMoveTo function as declared in include/cairo.h:890
func RelMoveTo(cr *Cairo, dx float64, dy float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdx, _ := (C.double)(dx), cgoAllocsUnknown
cdy, _ := (C.double)(dy), cgoAllocsUnknown
C.cairo_rel_move_to(ccr, cdx, cdy)
}
// RelLineTo function as declared in include/cairo.h:893
func RelLineTo(cr *Cairo, dx float64, dy float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdx, _ := (C.double)(dx), cgoAllocsUnknown
cdy, _ := (C.double)(dy), cgoAllocsUnknown
C.cairo_rel_line_to(ccr, cdx, cdy)
}
// RelCurveTo function as declared in include/cairo.h:896
func RelCurveTo(cr *Cairo, dx1 float64, dy1 float64, dx2 float64, dy2 float64, dx3 float64, dy3 float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cdx1, _ := (C.double)(dx1), cgoAllocsUnknown
cdy1, _ := (C.double)(dy1), cgoAllocsUnknown
cdx2, _ := (C.double)(dx2), cgoAllocsUnknown
cdy2, _ := (C.double)(dy2), cgoAllocsUnknown
cdx3, _ := (C.double)(dx3), cgoAllocsUnknown
cdy3, _ := (C.double)(dy3), cgoAllocsUnknown
C.cairo_rel_curve_to(ccr, cdx1, cdy1, cdx2, cdy2, cdx3, cdy3)
}
// MakeRectangle function as declared in include/cairo.h:902
func MakeRectangle(cr *Cairo, x float64, y float64, width float64, height float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
cwidth, _ := (C.double)(width), cgoAllocsUnknown
cheight, _ := (C.double)(height), cgoAllocsUnknown
C.cairo_rectangle(ccr, cx, cy, cwidth, cheight)
}
// ClosePath function as declared in include/cairo.h:912
func ClosePath(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_close_path(ccr)
}
// PathExtents function as declared in include/cairo.h:915
func PathExtents(cr *Cairo, x1 *float64, y1 *float64, x2 *float64, y2 *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx1, _ := (*C.double)(unsafe.Pointer(x1)), cgoAllocsUnknown
cy1, _ := (*C.double)(unsafe.Pointer(y1)), cgoAllocsUnknown
cx2, _ := (*C.double)(unsafe.Pointer(x2)), cgoAllocsUnknown
cy2, _ := (*C.double)(unsafe.Pointer(y2)), cgoAllocsUnknown
C.cairo_path_extents(ccr, cx1, cy1, cx2, cy2)
}
// Paint function as declared in include/cairo.h:921
func Paint(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_paint(ccr)
}
// PaintWithAlpha function as declared in include/cairo.h:924
func PaintWithAlpha(cr *Cairo, alpha float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
calpha, _ := (C.double)(alpha), cgoAllocsUnknown
C.cairo_paint_with_alpha(ccr, calpha)
}
// Mask function as declared in include/cairo.h:928
func Mask(cr *Cairo, pattern *Pattern) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cpattern, _ := (*C.cairo_pattern_t)(unsafe.Pointer(pattern)), cgoAllocsUnknown
C.cairo_mask(ccr, cpattern)
}
// MaskSurface function as declared in include/cairo.h:932
func MaskSurface(cr *Cairo, surface *Surface, surfaceX float64, surfaceY float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
csurface, _ := (*C.cairo_surface_t)(unsafe.Pointer(surface)), cgoAllocsUnknown
csurfaceX, _ := (C.double)(surfaceX), cgoAllocsUnknown
csurfaceY, _ := (C.double)(surfaceY), cgoAllocsUnknown
C.cairo_mask_surface(ccr, csurface, csurfaceX, csurfaceY)
}
// Stroke function as declared in include/cairo.h:938
func Stroke(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_stroke(ccr)
}
// StrokePreserve function as declared in include/cairo.h:941
func StrokePreserve(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_stroke_preserve(ccr)
}
// Fill function as declared in include/cairo.h:944
func Fill(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_fill(ccr)
}
// FillPreserve function as declared in include/cairo.h:947
func FillPreserve(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_fill_preserve(ccr)
}
// CopyPage function as declared in include/cairo.h:950
func CopyPage(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_copy_page(ccr)
}
// ShowPage function as declared in include/cairo.h:953
func ShowPage(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_show_page(ccr)
}
// InStroke function as declared in include/cairo.h:957
func InStroke(cr *Cairo, x float64, y float64) Bool {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
__ret := C.cairo_in_stroke(ccr, cx, cy)
__v := (Bool)(__ret)
return __v
}
// InFill function as declared in include/cairo.h:960
func InFill(cr *Cairo, x float64, y float64) Bool {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
__ret := C.cairo_in_fill(ccr, cx, cy)
__v := (Bool)(__ret)
return __v
}
// InClip function as declared in include/cairo.h:963
func InClip(cr *Cairo, x float64, y float64) Bool {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx, _ := (C.double)(x), cgoAllocsUnknown
cy, _ := (C.double)(y), cgoAllocsUnknown
__ret := C.cairo_in_clip(ccr, cx, cy)
__v := (Bool)(__ret)
return __v
}
// StrokeExtents function as declared in include/cairo.h:967
func StrokeExtents(cr *Cairo, x1 *float64, y1 *float64, x2 *float64, y2 *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx1, _ := (*C.double)(unsafe.Pointer(x1)), cgoAllocsUnknown
cy1, _ := (*C.double)(unsafe.Pointer(y1)), cgoAllocsUnknown
cx2, _ := (*C.double)(unsafe.Pointer(x2)), cgoAllocsUnknown
cy2, _ := (*C.double)(unsafe.Pointer(y2)), cgoAllocsUnknown
C.cairo_stroke_extents(ccr, cx1, cy1, cx2, cy2)
}
// FillExtents function as declared in include/cairo.h:972
func FillExtents(cr *Cairo, x1 *float64, y1 *float64, x2 *float64, y2 *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx1, _ := (*C.double)(unsafe.Pointer(x1)), cgoAllocsUnknown
cy1, _ := (*C.double)(unsafe.Pointer(y1)), cgoAllocsUnknown
cx2, _ := (*C.double)(unsafe.Pointer(x2)), cgoAllocsUnknown
cy2, _ := (*C.double)(unsafe.Pointer(y2)), cgoAllocsUnknown
C.cairo_fill_extents(ccr, cx1, cy1, cx2, cy2)
}
// ResetClip function as declared in include/cairo.h:978
func ResetClip(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_reset_clip(ccr)
}
// Clip function as declared in include/cairo.h:981
func Clip(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_clip(ccr)
}
// ClipPreserve function as declared in include/cairo.h:984
func ClipPreserve(cr *Cairo) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
C.cairo_clip_preserve(ccr)
}
// ClipExtents function as declared in include/cairo.h:987
func ClipExtents(cr *Cairo, x1 *float64, y1 *float64, x2 *float64, y2 *float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cx1, _ := (*C.double)(unsafe.Pointer(x1)), cgoAllocsUnknown
cy1, _ := (*C.double)(unsafe.Pointer(y1)), cgoAllocsUnknown
cx2, _ := (*C.double)(unsafe.Pointer(x2)), cgoAllocsUnknown
cy2, _ := (*C.double)(unsafe.Pointer(y2)), cgoAllocsUnknown
C.cairo_clip_extents(ccr, cx1, cy1, cx2, cy2)
}
// CopyClipRectangleList function as declared in include/cairo.h:1023
func CopyClipRectangleList(cr *Cairo) *RectangleList {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_copy_clip_rectangle_list(ccr)
__v := NewRectangleListRef(unsafe.Pointer(__ret))
return __v
}
// RectangleListDestroy function as declared in include/cairo.h:1027
func RectangleListDestroy(rectangleList *RectangleList) {
crectangleList, _ := rectangleList.PassRef()
C.cairo_rectangle_list_destroy(crectangleList)
}
// TagBegin function as declared in include/cairo.h:1035
func TagBegin(cr *Cairo, tagName string, attributes string) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
tagName = safeString(tagName)
ctagName, _ := unpackPCharString(tagName)
attributes = safeString(attributes)
cattributes, _ := unpackPCharString(attributes)
C.cairo_tag_begin(ccr, ctagName, cattributes)
runtime.KeepAlive(attributes)
runtime.KeepAlive(tagName)
}
// TagEnd function as declared in include/cairo.h:1038
func TagEnd(cr *Cairo, tagName string) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
tagName = safeString(tagName)
ctagName, _ := unpackPCharString(tagName)
C.cairo_tag_end(ccr, ctagName)
runtime.KeepAlive(tagName)
}
// GlyphAllocate function as declared in include/cairo.h:1114
func GlyphAllocate(numGlyphs int32) *Glyph {
cnumGlyphs, _ := (C.int)(numGlyphs), cgoAllocsUnknown
__ret := C.cairo_glyph_allocate(cnumGlyphs)
__v := NewGlyphRef(unsafe.Pointer(__ret))
return __v
}
// GlyphFree function as declared in include/cairo.h:1118
func GlyphFree(glyphs *Glyph) {
cglyphs, _ := glyphs.PassRef()
C.cairo_glyph_free(cglyphs)
}
// TextClusterAllocate function as declared in include/cairo.h:1145
func TextClusterAllocate(numClusters int32) *TextCluster {
cnumClusters, _ := (C.int)(numClusters), cgoAllocsUnknown
__ret := C.cairo_text_cluster_allocate(cnumClusters)
__v := NewTextClusterRef(unsafe.Pointer(__ret))
return __v
}
// TextClusterFree function as declared in include/cairo.h:1149
func TextClusterFree(clusters *TextCluster) {
cclusters, _ := clusters.PassRef()
C.cairo_text_cluster_free(cclusters)
}
// FontOptionsCreate function as declared in include/cairo.h:1387
func FontOptionsCreate() *FontOptions {
__ret := C.cairo_font_options_create()
__v := *(**FontOptions)(unsafe.Pointer(&__ret))
return __v
}
// FontOptionsCopy function as declared in include/cairo.h:1390
func FontOptionsCopy(original *FontOptions) *FontOptions {
coriginal, _ := (*C.cairo_font_options_t)(unsafe.Pointer(original)), cgoAllocsUnknown
__ret := C.cairo_font_options_copy(coriginal)
__v := *(**FontOptions)(unsafe.Pointer(&__ret))
return __v
}
// FontOptionsDestroy function as declared in include/cairo.h:1394
func FontOptionsDestroy(options *FontOptions) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
C.cairo_font_options_destroy(coptions)
}
// FontOptionsStatus function as declared in include/cairo.h:1397
func FontOptionsStatus(options *FontOptions) Status {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_status(coptions)
__v := (Status)(__ret)
return __v
}
// FontOptionsMerge function as declared in include/cairo.h:1400
func FontOptionsMerge(options *FontOptions, other *FontOptions) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
cother, _ := (*C.cairo_font_options_t)(unsafe.Pointer(other)), cgoAllocsUnknown
C.cairo_font_options_merge(coptions, cother)
}
// FontOptionsEqual function as declared in include/cairo.h:1403
func FontOptionsEqual(options *FontOptions, other *FontOptions) Bool {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
cother, _ := (*C.cairo_font_options_t)(unsafe.Pointer(other)), cgoAllocsUnknown
__ret := C.cairo_font_options_equal(coptions, cother)
__v := (Bool)(__ret)
return __v
}
// FontOptionsHash function as declared in include/cairo.h:1407
func FontOptionsHash(options *FontOptions) uint {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_hash(coptions)
__v := (uint)(__ret)
return __v
}
// FontOptionsSetAntialias function as declared in include/cairo.h:1410
func FontOptionsSetAntialias(options *FontOptions, antialias Antialias) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
cantialias, _ := (C.cairo_antialias_t)(antialias), cgoAllocsUnknown
C.cairo_font_options_set_antialias(coptions, cantialias)
}
// FontOptionsGetAntialias function as declared in include/cairo.h:1413
func FontOptionsGetAntialias(options *FontOptions) Antialias {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_get_antialias(coptions)
__v := (Antialias)(__ret)
return __v
}
// FontOptionsSetSubpixelOrder function as declared in include/cairo.h:1416
func FontOptionsSetSubpixelOrder(options *FontOptions, subpixelOrder SubpixelOrder) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
csubpixelOrder, _ := (C.cairo_subpixel_order_t)(subpixelOrder), cgoAllocsUnknown
C.cairo_font_options_set_subpixel_order(coptions, csubpixelOrder)
}
// FontOptionsGetSubpixelOrder function as declared in include/cairo.h:1419
func FontOptionsGetSubpixelOrder(options *FontOptions) SubpixelOrder {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_get_subpixel_order(coptions)
__v := (SubpixelOrder)(__ret)
return __v
}
// FontOptionsSetHintStyle function as declared in include/cairo.h:1422
func FontOptionsSetHintStyle(options *FontOptions, hintStyle HintStyle) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
chintStyle, _ := (C.cairo_hint_style_t)(hintStyle), cgoAllocsUnknown
C.cairo_font_options_set_hint_style(coptions, chintStyle)
}
// FontOptionsGetHintStyle function as declared in include/cairo.h:1425
func FontOptionsGetHintStyle(options *FontOptions) HintStyle {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_get_hint_style(coptions)
__v := (HintStyle)(__ret)
return __v
}
// FontOptionsSetHintMetrics function as declared in include/cairo.h:1428
func FontOptionsSetHintMetrics(options *FontOptions, hintMetrics HintMetrics) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
chintMetrics, _ := (C.cairo_hint_metrics_t)(hintMetrics), cgoAllocsUnknown
C.cairo_font_options_set_hint_metrics(coptions, chintMetrics)
}
// FontOptionsGetHintMetrics function as declared in include/cairo.h:1431
func FontOptionsGetHintMetrics(options *FontOptions) HintMetrics {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_get_hint_metrics(coptions)
__v := (HintMetrics)(__ret)
return __v
}
// FontOptionsGetVariations function as declared in include/cairo.h:1433
func FontOptionsGetVariations(options *FontOptions) string {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_font_options_get_variations(coptions)
__v := packPCharString(__ret)
return __v
}
// FontOptionsSetVariations function as declared in include/cairo.h:1437
func FontOptionsSetVariations(options *FontOptions, variations string) {
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
variations = safeString(variations)
cvariations, _ := unpackPCharString(variations)
C.cairo_font_options_set_variations(coptions, cvariations)
runtime.KeepAlive(variations)
}
// SelectFontFace function as declared in include/cairo.h:1444
func SelectFontFace(cr *Cairo, family string, slant FontSlant, weight FontWeight) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
family = safeString(family)
cfamily, _ := unpackPCharString(family)
cslant, _ := (C.cairo_font_slant_t)(slant), cgoAllocsUnknown
cweight, _ := (C.cairo_font_weight_t)(weight), cgoAllocsUnknown
C.cairo_select_font_face(ccr, cfamily, cslant, cweight)
runtime.KeepAlive(family)
}
// SetFontSize function as declared in include/cairo.h:1450
func SetFontSize(cr *Cairo, size float64) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
csize, _ := (C.double)(size), cgoAllocsUnknown
C.cairo_set_font_size(ccr, csize)
}
// SetFontMatrix function as declared in include/cairo.h:1453
func SetFontMatrix(cr *Cairo, matrix *Matrix) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cmatrix, _ := matrix.PassRef()
C.cairo_set_font_matrix(ccr, cmatrix)
}
// GetFontMatrix function as declared in include/cairo.h:1457
func GetFontMatrix(cr *Cairo, matrix *Matrix) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cmatrix, _ := matrix.PassRef()
C.cairo_get_font_matrix(ccr, cmatrix)
}
// SetFontOptions function as declared in include/cairo.h:1461
func SetFontOptions(cr *Cairo, options *FontOptions) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
C.cairo_set_font_options(ccr, coptions)
}
// GetFontOptions function as declared in include/cairo.h:1465
func GetFontOptions(cr *Cairo, options *FontOptions) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
C.cairo_get_font_options(ccr, coptions)
}
// SetFontFace function as declared in include/cairo.h:1469
func SetFontFace(cr *Cairo, fontFace *FontFace) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
C.cairo_set_font_face(ccr, cfontFace)
}
// GetFontFace function as declared in include/cairo.h:1471
func GetFontFace(cr *Cairo) *FontFace {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_get_font_face(ccr)
__v := *(**FontFace)(unsafe.Pointer(&__ret))
return __v
}
// SetScaledFont function as declared in include/cairo.h:1475
func SetScaledFont(cr *Cairo, scaledFont *ScaledFont) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cscaledFont, _ := (*C.cairo_scaled_font_t)(unsafe.Pointer(scaledFont)), cgoAllocsUnknown
C.cairo_set_scaled_font(ccr, cscaledFont)
}
// GetScaledFont function as declared in include/cairo.h:1478
func GetScaledFont(cr *Cairo) *ScaledFont {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
__ret := C.cairo_get_scaled_font(ccr)
__v := *(**ScaledFont)(unsafe.Pointer(&__ret))
return __v
}
// ShowText function as declared in include/cairo.h:1482
func ShowText(cr *Cairo, utf8 string) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
utf8 = safeString(utf8)
cutf8, _ := unpackPCharString(utf8)
C.cairo_show_text(ccr, cutf8)
runtime.KeepAlive(utf8)
}
// ShowGlyphs function as declared in include/cairo.h:1485
func ShowGlyphs(cr *Cairo, glyphs *Glyph, numGlyphs int32) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cglyphs, _ := glyphs.PassRef()
cnumGlyphs, _ := (C.int)(numGlyphs), cgoAllocsUnknown
C.cairo_show_glyphs(ccr, cglyphs, cnumGlyphs)
}
// ShowTextGlyphs function as declared in include/cairo.h:1488
func ShowTextGlyphs(cr *Cairo, utf8 string, utf8Len int32, glyphs *Glyph, numGlyphs int32, clusters *TextCluster, numClusters int32, clusterFlags TextClusterFlags) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
utf8 = safeString(utf8)
cutf8, _ := unpackPCharString(utf8)
cutf8Len, _ := (C.int)(utf8Len), cgoAllocsUnknown
cglyphs, _ := glyphs.PassRef()
cnumGlyphs, _ := (C.int)(numGlyphs), cgoAllocsUnknown
cclusters, _ := clusters.PassRef()
cnumClusters, _ := (C.int)(numClusters), cgoAllocsUnknown
cclusterFlags, _ := (C.cairo_text_cluster_flags_t)(clusterFlags), cgoAllocsUnknown
C.cairo_show_text_glyphs(ccr, cutf8, cutf8Len, cglyphs, cnumGlyphs, cclusters, cnumClusters, cclusterFlags)
runtime.KeepAlive(utf8)
}
// TextPath function as declared in include/cairo.h:1498
func TextPath(cr *Cairo, utf8 string) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
utf8 = safeString(utf8)
cutf8, _ := unpackPCharString(utf8)
C.cairo_text_path(ccr, cutf8)
runtime.KeepAlive(utf8)
}
// GlyphPath function as declared in include/cairo.h:1501
func GlyphPath(cr *Cairo, glyphs *Glyph, numGlyphs int32) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cglyphs, _ := glyphs.PassRef()
cnumGlyphs, _ := (C.int)(numGlyphs), cgoAllocsUnknown
C.cairo_glyph_path(ccr, cglyphs, cnumGlyphs)
}
// GetTextExtents function as declared in include/cairo.h:1504
func GetTextExtents(cr *Cairo, utf8 string, extents *TextExtents) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
utf8 = safeString(utf8)
cutf8, _ := unpackPCharString(utf8)
cextents, _ := extents.PassRef()
C.cairo_text_extents(ccr, cutf8, cextents)
runtime.KeepAlive(utf8)
}
// GlyphExtents function as declared in include/cairo.h:1509
func GlyphExtents(cr *Cairo, glyphs *Glyph, numGlyphs int32, extents *TextExtents) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cglyphs, _ := glyphs.PassRef()
cnumGlyphs, _ := (C.int)(numGlyphs), cgoAllocsUnknown
cextents, _ := extents.PassRef()
C.cairo_glyph_extents(ccr, cglyphs, cnumGlyphs, cextents)
}
// GetFontExtents function as declared in include/cairo.h:1515
func GetFontExtents(cr *Cairo, extents *FontExtents) {
ccr, _ := (*C.cairo_t)(unsafe.Pointer(cr)), cgoAllocsUnknown
cextents, _ := extents.PassRef()
C.cairo_font_extents(ccr, cextents)
}
// FontFaceReference function as declared in include/cairo.h:1520
func FontFaceReference(fontFace *FontFace) *FontFace {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
__ret := C.cairo_font_face_reference(cfontFace)
__v := *(**FontFace)(unsafe.Pointer(&__ret))
return __v
}
// FontFaceDestroy function as declared in include/cairo.h:1524
func FontFaceDestroy(fontFace *FontFace) {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
C.cairo_font_face_destroy(cfontFace)
}
// FontFaceGetReferenceCount function as declared in include/cairo.h:1527
func FontFaceGetReferenceCount(fontFace *FontFace) uint32 {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
__ret := C.cairo_font_face_get_reference_count(cfontFace)
__v := (uint32)(__ret)
return __v
}
// FontFaceStatus function as declared in include/cairo.h:1530
func FontFaceStatus(fontFace *FontFace) Status {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
__ret := C.cairo_font_face_status(cfontFace)
__v := (Status)(__ret)
return __v
}
// FontFaceGetType function as declared in include/cairo.h:1581
func FontFaceGetType(fontFace *FontFace) FontType {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
__ret := C.cairo_font_face_get_type(cfontFace)
__v := (FontType)(__ret)
return __v
}
// FontFaceGetUserData function as declared in include/cairo.h:1583
func FontFaceGetUserData(fontFace *FontFace, key *UserDataKey) unsafe.Pointer {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
ckey, _ := key.PassRef()
__ret := C.cairo_font_face_get_user_data(cfontFace, ckey)
__v := *(*unsafe.Pointer)(unsafe.Pointer(&__ret))
return __v
}
// FontFaceSetUserData function as declared in include/cairo.h:1588
func FontFaceSetUserData(fontFace *FontFace, key *UserDataKey, userData unsafe.Pointer, destroy DestroyFunc) Status {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
ckey, _ := key.PassRef()
cuserData, _ := userData, cgoAllocsUnknown
cdestroy, _ := destroy.PassValue()
__ret := C.cairo_font_face_set_user_data(cfontFace, ckey, cuserData, cdestroy)
__v := (Status)(__ret)
return __v
}
// ScaledFontCreate function as declared in include/cairo.h:1595
func ScaledFontCreate(fontFace *FontFace, fontMatrix *Matrix, ctm *Matrix, options *FontOptions) *ScaledFont {
cfontFace, _ := (*C.cairo_font_face_t)(unsafe.Pointer(fontFace)), cgoAllocsUnknown
cfontMatrix, _ := fontMatrix.PassRef()
cctm, _ := ctm.PassRef()
coptions, _ := (*C.cairo_font_options_t)(unsafe.Pointer(options)), cgoAllocsUnknown
__ret := C.cairo_scaled_font_create(cfontFace, cfontMatrix, cctm, coptions)
__v := *(**ScaledFont)(unsafe.Pointer(&__ret))
return __v
}
// ScaledFontReference function as declared in include/cairo.h:1601
func ScaledFontReference(scaledFont *ScaledFont) *ScaledFont {
cscaledFont, _ := (*C.cairo_scaled_font_t)(unsafe.Pointer(scaledFont)), cgoAllocsUnknown
__ret := C.cairo_scaled_font_reference(cscaledFont)
__v := *(**ScaledFont)(unsafe.Pointer(&__ret))
return __v
}
// ScaledFontDestroy function as declared in include/cairo.h:1605
func ScaledFontDestroy(scaledFont *ScaledFont) {
cscaledFont, _ := (*C.cairo_scaled_font_t)(unsafe.Pointer(scaledFont)), cgoAllocsUnknown
C.cairo_scaled_font_destroy(cscaledFont)
}
// ScaledFontGetReferenceCount function as declared in include/cairo.h:1608
func ScaledFontGetReferenceCount(scaledFont *ScaledFont) uint32 {
cscaledFont, _ := (*C.cairo_scaled_font_t)(unsafe.Pointer(scaledFont)), cgoAllocsUnknown
__ret := C.cairo_scaled_font_get_reference_count(cscaledFont)
__v := (uint32)(__ret)
return __v
}
// ScaledFontStatus function as declared in include/cairo.h:1611
func ScaledFontStatus(scaledFont *ScaledFont) Status {
cscaledFont, _ := (*C.cairo_scaled_font_t)(unsafe.Pointer(scaledFont)), cgoAllocsUnknown
__ret := C.cairo_scaled_font_status(cscaledFont)
__v := (Status)(__ret)
return __v
}
// ScaledFontGetType function as declared in include/cairo.h:1614
func ScaledFontGetType(scaledFont *ScaledFont) FontType {