GitXplorerGitXplorer
s

go-aalib

public
11 stars
3 forks
0 issues

Commits

List of commits on branch master.
Verified
1d6e53da7a43ad2512dd074f22da5d93cb59b6ed

Merge pull request #1 from syohex/modernize

ssyohex committed 3 years ago
Verified
fd1e447dcc685c8fc139a69c96d9e5441a20f7a7

modernize

ssyohex committed 3 years ago
Unverified
057dadc82519021e973bd077454559a0f6f2155b

install dependency before testing

ssyohex committed 11 years ago
Unverified
e14cb8dc2d1e6ae440d440b0d27d9712e26ebff5

add .travis.yml

ssyohex committed 11 years ago
Unverified
409a1771f5b26b39f834eaa1589713d7174b10c9

use macros

ssyohex committed 12 years ago
Unverified
37331f35722465985d7f27e145209b68f2cc57e5

Fix example

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)
}