GitXplorerGitXplorer
s

go-aalib

public
11 stars
3 forks
0 issues

Commits

List of commits on branch master.
Unverified
4ad2ccbc71b62dcac1a847fc1879c643607a9ee1

Add mask macros

ssyohex committed 12 years ago
Unverified
e9a4fc53237c712800c372722c012207d5c1009b

Add tests

ssyohex committed 12 years ago
Unverified
4912a83943e1736441252ccbc5c5adce55d014d0

Fix aa_resize binding

ssyohex committed 12 years ago
Unverified
cd446e49eaed3f84e73eba35e7c3cca8bc76e0ed

add LICENSE

ssyohex committed 12 years ago
Unverified
3f660b7283a31906372f2e02a14d08afb784f0b7

init repos

ssyohex committed 12 years ago

README

The README file for this repository.

go-aalib

AAlib binding for Go.

Sample Code

package main

import "github.com/syohex/go-aalib"
import "image"
import _ "image/png"
import "fmt"
import "os"

func main() {
	file, err := os.Open("sample.png")
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	defer file.Close()

	// Decode the image.
	goPng, _, err := image.Decode(file)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	handle, _ := aalib.Init(80, 60, aalib.AA_NORMAL_MASK)
	handle.PutImage(goPng)
	handle.Render(nil, 0, 0, 96, 96)
	aaStr := handle.Text()
	fmt.Println(aaStr)
}