Sander Schobers
2924980035
- Depends on optional allegro libraries font, image, primitives and ttf as well.
26 lines
921 B
Go
26 lines
921 B
Go
package allegro5
|
|
|
|
// #include <allegro5/allegro.h>
|
|
import "C"
|
|
|
|
// BitmapFlag is extra information provided for creating a bitmap
|
|
type BitmapFlag int
|
|
|
|
const (
|
|
// BitmapFlagLinearScaleDown enables linear scaling when scaling down. Gives better results when combined with BitmapFlagMipMap
|
|
BitmapFlagLinearScaleDown BitmapFlag = C.ALLEGRO_MIN_LINEAR
|
|
// BitmapFlagLinearScaleUp enables linear scaling when scaling up.
|
|
BitmapFlagLinearScaleUp = C.ALLEGRO_MAG_LINEAR
|
|
// BitmapFlagMipMap enables mipmaps for drawing a scaled down version. Bitmap must square and its sides must be a power of two.
|
|
BitmapFlagMipMap = C.ALLEGRO_MIPMAP
|
|
)
|
|
|
|
// ClearToColor clears the target bitmap to the color
|
|
func ClearToColor(c Color) {
|
|
C.al_clear_to_color(c.color)
|
|
}
|
|
|
|
// SetNewBitmapFlags sets the default bitmap flags for a newly created bitmap
|
|
func SetNewBitmapFlags(flags BitmapFlag) {
|
|
C.al_set_new_bitmap_flags(C.int(flags))
|
|
} |