当前位置: 首页>>代码示例>>Golang>>正文


Golang C.TTF_FontAscent函数代码示例

本文整理汇总了Golang中C.TTF_FontAscent函数的典型用法代码示例。如果您正苦于以下问题:Golang TTF_FontAscent函数的具体用法?Golang TTF_FontAscent怎么用?Golang TTF_FontAscent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了TTF_FontAscent函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Ascent

// 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)) }
开发者ID:veandco,项目名称:go-sdl2,代码行数:2,代码来源:sdl_ttf.go

示例2: TTFFontAscent

// 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))
}
开发者ID:beoran,项目名称:fungo,代码行数:5,代码来源:ttf.go

示例3: Ascent

// 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
}
开发者ID:Zwobot,项目名称:Go-SDL,代码行数:8,代码来源:ttf.go

示例4: Ascent

// 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
}
开发者ID:krig,项目名称:Go-SDL2,代码行数:6,代码来源:ttf.go


注:本文中的C.TTF_FontAscent函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。