LTexture texture; SDL_Rect destRect; destRect.x = 0; destRect.y = 0; destRect.w = 100; destRect.h = 100; if (!texture.loadFromFile("example.png")) { // handle error } texture.render(destRect);
LTexture texture; SDL_Rect destRect; destRect.x = 0; destRect.y = 0; destRect.w = 200; destRect.h = 200; if (!texture.loadFromFile("example.png")) { // handle error } texture.render(destRect, NULL, SDL_FLIP_NONE, 2);In this example, the same image as the previous example is loaded and rendered to the window with a width and height of 200 pixels. The 4th parameter of the `render()` function specifies the scale factor, which in this case is 2. The package/library for LTexture is the SDL_image library.