Exemplo n.º 1
0
func (f *Font) DrawJustified(color Color, x1, x2, y, diff float32, flags int, text string) {
	ctext := C.CString(text)
	defer C.free(unsafe.Pointer(ctext))

	C.al_draw_justified_text((*C.ALLEGRO_FONT)(f), C.ALLEGRO_COLOR(color),
		C.float(x1), C.float(x2), C.float(y), C.float(diff), C.int(flags), ctext)

}
Exemplo n.º 2
0
func (f *Font) DrawJustifiedText(c *allegro.Color, x1, x2, y, diff float32, flags int32, text string) {
	t := C.CString(text)
	defer C.free(unsafe.Pointer(t))
	C.al_draw_justified_text((*C.ALLEGRO_FONT)(unsafe.Pointer(f)), *((*C.ALLEGRO_COLOR)(unsafe.Pointer(c))), C.float(x1), C.float(x2), C.float(y), C.float(diff), C.int(flags), t)
}