SDL_RenderTexture9Grid

Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision.

The pixels in the texture are split into a 3x3 grid, using the different corner sizes for each corner, and the sides and center making up the remaining pixels. The corners are then scaled using scale and fit into the corners of the destination rectangle. The sides and center are then stretched into place to cover the remaining destination rectangle.

extern (C) nothrow @nogc extern
bool
SDL_RenderTexture9Grid

Parameters

renderer SDL_Renderer*

The renderer which should copy parts of a texture.

texture SDL_Texture*

The source texture.

srcrect const(SDL_FRect)*

The SDL_Rect structure representing the rectangle to be used for the 9-grid, or null to use the entire texture.

left_width float

The width, in pixels, of the left corners in srcrect.

right_width float

The width, in pixels, of the right corners in srcrect.

top_height float

The height, in pixels, of the top corners in srcrect.

bottom_height float

The height, in pixels, of the bottom corners in srcrect.

scale float

The scale used to transform the corner of srcrect into the corner of dstrect, or 0.0f for an unscaled copy.

dstrect const(SDL_FRect)*

A pointer to the destination rectangle, or null for the entire rendering target.

Return Value

Type: bool

true on success or false on failure; call SDL_GetError for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta