Move functions
This commit is contained in:
parent
9f257fc589
commit
f953e65a3a
6 changed files with 184 additions and 215 deletions
|
@ -10,11 +10,21 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
// newGlyphInfoFromPointer - Returns new GlyphInfo from pointer
|
||||
func newGlyphInfoFromPointer(ptr unsafe.Pointer) GlyphInfo {
|
||||
return *(*GlyphInfo)(ptr)
|
||||
}
|
||||
|
||||
// cptr returns C pointer
|
||||
func (c *GlyphInfo) cptr() *C.GlyphInfo {
|
||||
return (*C.GlyphInfo)(unsafe.Pointer(c))
|
||||
}
|
||||
|
||||
// newFontFromPointer - Returns new Font from pointer
|
||||
func newFontFromPointer(ptr unsafe.Pointer) Font {
|
||||
return *(*Font)(ptr)
|
||||
}
|
||||
|
||||
// cptr returns C pointer
|
||||
func (s *Font) cptr() *C.Font {
|
||||
return (*C.Font)(unsafe.Pointer(s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue