Beispiel #1
0
func (b *Bitmap) Lock(format, flags int) LockedRegion {
	w, h := b.GetDimensions()
	ptr := C.al_lock_bitmap((*C.ALLEGRO_BITMAP)(b), C.int(format), C.int(flags))
	return CreateLockedRegion(ptr, w, h)
}
Beispiel #2
0
func (b *Bitmap) Lock(format, flags int32) *LockedRegion {
	l := C.al_lock_bitmap((*C.ALLEGRO_BITMAP)(unsafe.Pointer(b)), C.int(format), C.int(flags))
	return (*LockedRegion)(unsafe.Pointer(l))
}