Example #1
0
func (f *Font) Draw(color Color, x, y float32, flags int, text string) {
	ctext := C.CString(text)
	defer C.free(unsafe.Pointer(ctext))

	C.al_draw_text((*C.ALLEGRO_FONT)(f), (C.ALLEGRO_COLOR)(color),
		C.float(x), C.float(y), C.int(flags), ctext)

}
Example #2
0
func (f *Font) DrawText(c *allegro.Color, x, y float32, flags int32, text string) {
	t := C.CString(text)
	defer C.free(unsafe.Pointer(t))
	C.al_draw_text((*C.ALLEGRO_FONT)(unsafe.Pointer(f)), *((*C.ALLEGRO_COLOR)(unsafe.Pointer(c))), C.float(x), C.float(y), C.int(flags), t)
}