示例#1
0
// Ascent (https://www.libsdl.org/projects/SDL_ttf/docs/SDL_ttf_30.html#SEC30)
func (f *Font) Ascent() int { return int(C.TTF_FontAscent(f.f)) }
示例#2
0
文件: ttf.go 项目: beoran/fungo
// Get the offset from the baseline to the top of the font
// This is a positive value, relative to the baseline.
func TTFFontAscent(font *C.TTF_Font) int {
	return int(C.TTF_FontAscent(font))
}
示例#3
0
文件: ttf.go 项目: Zwobot/Go-SDL
// Returns the maximum pixel ascent (from the baseline) of all the glyphs
// of the font.
func (f *Font) Ascent() int {
	f.mutex.RLock()
	result := int(C.TTF_FontAscent(f.cfont))
	f.mutex.RUnlock()
	return result
}
示例#4
0
文件: ttf.go 项目: krig/Go-SDL2
// Returns the maximum pixel ascent (from the baseline) of all the glyphs
// of the font.
func (f *Font) Ascent() int {
	result := int(C.TTF_FontAscent(f.cfont))
	return result
}