func (v *Context) ShowText(utf8 string) { cstr := C.CString(utf8) defer C.free(unsafe.Pointer(cstr)) C.cairo_show_text(v.native(), (*C.char)(cstr)) }
func (self *Surface) ShowText(text string) { cs := C.CString(text) C.cairo_show_text(self.context, cs) C.free(unsafe.Pointer(cs)) }
//ShowText draws a shape generated from s, rendered according to the current //Font, font matrix, and FontOptions. // //This method first computes a set of glyphs for the string of text. //The first glyph is placed so that its origin is at the current point. //The origin of each subsequent glyph is offset from that of the previous glyph //by the advance values of the previous glyph. // //After this call the current point is moved to the origin of where the next //glyph would be placed in this same progression. //That is, the current point will be at the origin of the final glyph offset //by its advance values. //This allows for easy display of a single logical string with multiple calls //to ShowText. // //Note // //ShowText is part of the toy api. //See ShowGlyphs for the "real" text display api. // //Originally cairo_show_text. func (c *Context) ShowText(s string) *Context { cs := C.CString(s) C.cairo_show_text(c.c, cs) C.free(unsafe.Pointer(cs)) return c }