Sander Schobers
2924980035
- Depends on optional allegro libraries font, image, primitives and ttf as well.
16 lines
339 B
Go
16 lines
339 B
Go
package allegro5
|
|
|
|
// #include <allegro5/allegro.h>
|
|
import "C"
|
|
|
|
type Color struct {
|
|
color C.ALLEGRO_COLOR
|
|
}
|
|
|
|
func NewColor(r, g, b byte) Color {
|
|
return Color{C.al_map_rgb(C.uchar(r), C.uchar(g), C.uchar(b))}
|
|
}
|
|
|
|
func NewColorAlpha(r, g, b, a byte) Color {
|
|
return Color{C.al_map_rgba(C.uchar(r), C.uchar(g), C.uchar(b), C.uchar(a))}
|
|
} |