func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels unsafe.Pointer, pitch int) int { _renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer)) _rect := (*C.SDL_Rect)(unsafe.Pointer(rect)) _format := (C.Uint32)(format) _pitch := (C.int)(pitch) return (int)(C.SDL_RenderReadPixels(_renderer, _rect, _format, pixels, _pitch)) }
// Renderer (https://wiki.libsdl.org/SDL_RenderReadPixels) func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels unsafe.Pointer, pitch int) error { _ret := C.SDL_RenderReadPixels(renderer.cptr(), rect.cptr(), C.Uint32(format), pixels, C.int(pitch)) if _ret < 0 { return GetError() } return nil }
func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels unsafe.Pointer, pitch int) int { return int(C.SDL_RenderReadPixels(renderer.cptr(), rect.cptr(), C.Uint32(format), pixels, C.int(pitch))) }