Fixed signature of Renderer.CopyF and used .cptr() on src *Rect's.
@@ -875,12 +875,12 @@ func (renderer *Renderer) FillRectsF(rects []FRect) error {
// CopyF copies a portion of the texture to the current rendering target.
// TODO: (https://wiki.libsdl.org/SDL_RenderCopyF)
-func (renderer *Renderer) CopyF(texture *Texture, src, dst *FRect) error {
+func (renderer *Renderer) CopyF(texture *Texture, src *Rect, dst *FRect) error {
return errorFromInt(int(
C.SDL_RenderCopyF(
renderer.cptr(),
texture.cptr(),
- (*C.SDL_Rect)(unsafe.Pointer(src)),
+ src.cptr(),
dst.cptr())))
}
@@ -891,7 +891,7 @@ func (renderer *Renderer) CopyExF(texture *Texture, src *Rect, dst *FRect, angle
C.SDL_RenderCopyExF(
renderer.cptr(),
texture.cptr(),
- (*C.SDL_Rect)(unsafe.Pointer(src)),
+ src.cptr(),
dst.cptr(),
C.double(angle),
center.cptr(),
