sdlRenderCopy function
- Pointer<
SdlRenderer> renderer, - Pointer<
SdlTexture> texture, - Pointer<
SdlRect> srcrect, - Pointer<
SdlRect> dstrect,
Copy a portion of the texture to the current rendering target.
The texture is blended with the destination based on its blend mode set with SDL_SetTextureBlendMode().
The texture color is affected based on its color modulation set by SDL_SetTextureColorMod().
The texture alpha is affected based on its alpha modulation set by SDL_SetTextureAlphaMod().
\param renderer the rendering context \param texture the source texture \param srcrect the source SDL_Rect structure or NULL for the entire texture \param dstrect the destination SDL_Rect structure or NULL for the entire rendering target; the texture will be stretched to fill the given rectangle \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_RenderCopyEx \sa SDL_SetTextureAlphaMod \sa SDL_SetTextureBlendMode \sa SDL_SetTextureColorMod
extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect)
Implementation
int sdlRenderCopy(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture,
Pointer<SdlRect> srcrect, Pointer<SdlRect> dstrect) {
final sdlRenderCopyLookupFunction = libSdl2.lookupFunction<
Int32 Function(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture,
Pointer<SdlRect> srcrect, Pointer<SdlRect> dstrect),
int Function(
Pointer<SdlRenderer> renderer,
Pointer<SdlTexture> texture,
Pointer<SdlRect> srcrect,
Pointer<SdlRect> dstrect)>('SDL_RenderCopy');
return sdlRenderCopyLookupFunction(renderer, texture, srcrect, dstrect);
}