File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,20 @@ CSFML_GRAPHICS_API sfTexture* sfTexture_copy(const sfTexture* texture);
178178////////////////////////////////////////////////////////////
179179CSFML_GRAPHICS_API void sfTexture_destroy (const sfTexture * texture );
180180
181+ ////////////////////////////////////////////////////////////
182+ /// \brief Resize the texture
183+ ///
184+ /// If this function fails, the texture is left unchanged.
185+ ///
186+ /// \param texture Texture to resize
187+ /// \param size Width and height of the texture
188+ /// \param sRgb `true` to enable sRGB conversion, `false` to disable it
189+ ///
190+ /// \return `true` if resizing was successful, `false` if it failed
191+ ///
192+ ////////////////////////////////////////////////////////////
193+ CSFML_GRAPHICS_API bool sfTexture_resize (sfTexture * texture , sfVector2u size , bool sRgb );
194+
181195////////////////////////////////////////////////////////////
182196/// \brief Return the size of the texture
183197///
Original file line number Diff line number Diff line change @@ -170,6 +170,15 @@ void sfTexture_destroy(const sfTexture* texture)
170170}
171171
172172
173+ // //////////////////////////////////////////////////////////
174+ bool sfTexture_resize (sfTexture* texture, sfVector2u size, bool sRgb )
175+ {
176+ assert (texture);
177+ assert (texture->This );
178+ return texture->This ->resize (convertVector2 (size), sRgb );
179+ }
180+
181+
173182// //////////////////////////////////////////////////////////
174183sfVector2u sfTexture_getSize (const sfTexture* texture)
175184{
You can’t perform that action at this time.
0 commit comments