forked from inkyblackness/imgui-go
-
Notifications
You must be signed in to change notification settings - Fork 15
/
FontGlyphRnagesBuilder.go
43 lines (32 loc) · 1.16 KB
/
FontGlyphRnagesBuilder.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
package imgui
// #include "FontGlyphRangesBuilderWrapper.h"
import "C"
type FontGlyphRangesBuilder uintptr
func NewGlyphRanges() GlyphRanges {
handle := C.IggNewGlyphRanges()
return GlyphRanges(handle)
}
func (ranges GlyphRanges) Data() GlyphRanges {
return GlyphRanges(C.IggGlyphRangesData(ranges.handle()))
}
func NewFontGlyphRangesBuilder() FontGlyphRangesBuilder {
handle := C.IggNewFontGlyphRangesBuilder()
return FontGlyphRangesBuilder(handle)
}
func (builder FontGlyphRangesBuilder) handle() C.IggFontGlyphRangesBuilder {
return C.IggFontGlyphRangesBuilder(builder)
}
func (builder FontGlyphRangesBuilder) AddText(text string) {
textArg, textFin := wrapString(text)
defer textFin()
C.IggFontGlyphRangesBuilderAddText(builder.handle(), textArg)
}
func (builder FontGlyphRangesBuilder) AddRanges(ranges GlyphRanges) {
C.IggFontGlyphRangesBuilderAddRanges(builder.handle(), C.IggGlyphRanges(ranges))
}
func (builder FontGlyphRangesBuilder) Clear() {
C.IggFontGlyphRangesBuilderClear(builder.handle())
}
func (builder FontGlyphRangesBuilder) BuildRanges(ranges GlyphRanges) {
C.IggFontGlyphRangesBuilderBuildRanges(builder.handle(), C.IggGlyphRanges(ranges))
}