예제 #1
0
파일: util.go 프로젝트: rsaarelm/teratogen
func IsoIcon(sheet string, idx int) gfx.ImageSpec {
	return gfx.OffsetSubImage(sheet, isoIconRect(idx), image.Pt(-TileW/2, -TileH/2))
}
예제 #2
0
파일: util.go 프로젝트: rsaarelm/teratogen
// LargeIcon returns a sevel-cell icon (basically 3x3 small icons) from the
// given icon sheet counting indexes from left to right and top to bottom. The
// icon will be offseted so that it's draw position corresponds to its central
// cell.
func LargeIcon(sheet string, idx int) gfx.ImageSpec {
	return gfx.OffsetSubImage(sheet, largeIconRect(idx), image.Pt(-TileW, -TileH))
}