sdlRenderTextureTiled function
- Pointer<
SdlRenderer> renderer, - Pointer<
SdlTexture> texture, - Pointer<
SdlFRect> srcrect, - double scale,
- Pointer<
SdlFRect> dstrect,
Tile a portion of the texture to the current rendering target at subpixel precision.
The pixels in srcrect
will be repeated as many times as needed to
completely fill dstrect
.
\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 scale the scale used to transform srcrect into the destination rectangle, e.g. a 32x32 texture with a scale of 2 would fill 64x64 tiles. \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.1.3.
\sa SDL_RenderTexture
extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureTiled(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float scale, const SDL_FRect *dstrect)
Implementation
bool sdlRenderTextureTiled(
Pointer<SdlRenderer> renderer,
Pointer<SdlTexture> texture,
Pointer<SdlFRect> srcrect,
double scale,
Pointer<SdlFRect> dstrect) {
final sdlRenderTextureTiledLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlRenderer> renderer, Pointer<SdlTexture> texture,
Pointer<SdlFRect> srcrect, Float scale, Pointer<SdlFRect> dstrect),
int Function(
Pointer<SdlRenderer> renderer,
Pointer<SdlTexture> texture,
Pointer<SdlFRect> srcrect,
double scale,
Pointer<SdlFRect> dstrect)>('SDL_RenderTextureTiled');
return sdlRenderTextureTiledLookupFunction(
renderer, texture, srcrect, scale, dstrect) ==
1;
}