示例#1
0
func (self *Surface) SelectFontFace(name string, font_slant_t, font_weight_t int) {
	s := C.CString(name)
	C.cairo_select_font_face(self.context, s, C.cairo_font_slant_t(font_slant_t), C.cairo_font_weight_t(font_weight_t))
	C.free(unsafe.Pointer(s))
}
示例#2
0
文件: cairo.go 项目: zvin/gocairo
func (self *Surface) SelectFontFace(name string, font_slant FontSlant, font_weight FontWeight) {
	p := C.CString(name)
	C.cairo_select_font_face(self.context, p, C.cairo_font_slant_t(font_slant), C.cairo_font_weight_t(font_weight))
	C.free(unsafe.Pointer(p))
}
示例#3
0
文件: text.go 项目: rosatolen/coyim
func (v *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight) {
	cstr := C.CString(family)
	defer C.free(unsafe.Pointer(cstr))
	C.cairo_select_font_face(v.native(), (*C.char)(cstr), C.cairo_font_slant_t(slant), C.cairo_font_weight_t(weight))
}
示例#4
0
func (s slant) c() C.cairo_font_slant_t {
	return C.cairo_font_slant_t(s)
}