sdlxRenderTexture function render
bool
sdlxRenderTexture(
- Pointer<
SdlRenderer> renderer, - Pointer<
SdlTexture> texture, { - SdlxFRect? srcrect,
- SdlxFRect? dstrect,
Copy a portion of the texture to the current rendering target at subpixel precision.
\param renderer the renderer which should copy parts of a texture. \param texture the source texture. \param srcrect a pointer to the source rectangle, or NULL for the entire texture. \param dstrect a pointer to the destination rectangle, or NULL for the entire rendering target. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.2.0.
\sa SDL_RenderTextureRotated \sa SDL_RenderTextureTiled
extern SDL_DECLSPEC bool SDLCALL SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect)
See also:
Implementation
bool sdlxRenderTexture(
Pointer<SdlRenderer> renderer,
Pointer<SdlTexture> texture, {
SdlxFRect? srcrect,
SdlxFRect? dstrect,
}) => ffi.using(
(arena) => sdlRenderTexture(
renderer,
texture,
srcrect?.toNative(arena) ?? nullptr,
dstrect?.toNative(arena) ?? nullptr,
),
);