Documentation
¶
Overview ¶
Package bitmap provides Go bindings for Android Bitmap (jnigraphics).
Index ¶
- func GetInfo(env *JNIEnv, jbitmap Jobject, info *AndroidBitmapInfo) int32
- func LockPixels(env *JNIEnv, jbitmap Jobject, addrPtr *unsafe.Pointer) int32
- func UnlockPixels(env *JNIEnv, jbitmap Jobject) int32
- type AndroidBitmapCompressFormat
- type AndroidBitmapInfo
- type AndroidBitmap_CompressWriteFunc
- type Error
- type Format
- type HardwareBuffer
- type JNIEnv
- type Jobject
- type NDROID_BITMAP_FLAGS
- type NDROID_BITMAP_FLAGS_ALPHA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInfo ¶
func GetInfo(env *JNIEnv, jbitmap Jobject, info *AndroidBitmapInfo) int32
GetInfo calls the underlying C function.
func LockPixels ¶
LockPixels calls the underlying C function.
func UnlockPixels ¶
UnlockPixels calls the underlying C function.
Types ¶
type AndroidBitmapCompressFormat ¶
type AndroidBitmapCompressFormat int32
const ( ANDROID_BITMAP_COMPRESS_FORMAT_JPEG AndroidBitmapCompressFormat = 0 ANDROID_BITMAP_COMPRESS_FORMAT_PNG AndroidBitmapCompressFormat = 1 ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSY AndroidBitmapCompressFormat = 3 ANDROID_BITMAP_COMPRESS_FORMAT_WEBP_LOSSLESS AndroidBitmapCompressFormat = 4 )
type AndroidBitmapInfo ¶
type AndroidBitmapInfo struct {
// contains filtered or unexported fields
}
AndroidBitmapInfo wraps the NDK AndroidBitmapInfo handle.
func NewAndroidBitmapInfoFromPointer ¶
func NewAndroidBitmapInfoFromPointer(ptr unsafe.Pointer) *AndroidBitmapInfo
NewAndroidBitmapInfoFromPointer wraps a raw AndroidBitmapInfo pointer.
func (*AndroidBitmapInfo) Pointer ¶
func (h *AndroidBitmapInfo) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
type AndroidBitmap_CompressWriteFunc ¶
type AndroidBitmap_CompressWriteFunc = capi.AndroidBitmap_CompressWriteFunc
type HardwareBuffer ¶
type HardwareBuffer struct {
// contains filtered or unexported fields
}
HardwareBuffer wraps the NDK AHardwareBuffer handle.
func NewHardwareBufferFromPointer ¶
func NewHardwareBufferFromPointer(ptr unsafe.Pointer) *HardwareBuffer
NewHardwareBufferFromPointer wraps a raw AHardwareBuffer pointer.
func (*HardwareBuffer) Pointer ¶
func (h *HardwareBuffer) Pointer() unsafe.Pointer
Pointer returns the underlying pointer as unsafe.Pointer.
type NDROID_BITMAP_FLAGS ¶
type NDROID_BITMAP_FLAGS int32
const (
ANDROID_BITMAP_FLAGS_IS_HARDWARE NDROID_BITMAP_FLAGS = -2147483648
)
type NDROID_BITMAP_FLAGS_ALPHA ¶
type NDROID_BITMAP_FLAGS_ALPHA int32
const ( ANDROID_BITMAP_FLAGS_ALPHA_PREMUL NDROID_BITMAP_FLAGS_ALPHA = 0 ANDROID_BITMAP_FLAGS_ALPHA_OPAQUE NDROID_BITMAP_FLAGS_ALPHA = 1 ANDROID_BITMAP_FLAGS_ALPHA_UNPREMUL NDROID_BITMAP_FLAGS_ALPHA = 2 ANDROID_BITMAP_FLAGS_ALPHA_MASK NDROID_BITMAP_FLAGS_ALPHA = 3 ANDROID_BITMAP_FLAGS_ALPHA_SHIFT NDROID_BITMAP_FLAGS_ALPHA = 0 )
Click to show internal directories.
Click to hide internal directories.