diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 781dace8..fedfff42 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -141,33 +141,6 @@ public: //////////////////////////////////////////////////////////// bool setActive(bool active = true) override; - //////////////////////////////////////////////////////////// - /// \brief Copy the current contents of the window to an image - /// - /// \deprecated - /// Use a sf::Texture and its sf::Texture::update(const Window&) - /// function and copy its contents into an sf::Image instead. - /// \code - /// sf::Vector2u windowSize = window.getSize(); - /// sf::Texture texture; - /// texture.create(windowSize.x, windowSize.y); - /// texture.update(window); - /// sf::Image screenshot = texture.copyToImage(); - /// \endcode - /// - /// This is a slow operation, whose main purpose is to make - /// screenshots of the application. If you want to update an - /// image with the contents of the window and then use it for - /// drawing, you should rather use a sf::Texture and its - /// update(Window&) function. - /// You can also draw things directly to a texture with the - /// sf::RenderTexture class. - /// - /// \return Image containing the captured contents - /// - //////////////////////////////////////////////////////////// - [[deprecated]] Image capture() const; - protected: //////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index 3dc4b6dd..179b1789 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -102,19 +102,6 @@ bool RenderWindow::setActive(bool active) } -//////////////////////////////////////////////////////////// -Image RenderWindow::capture() const -{ - Vector2u windowSize = getSize(); - - Texture texture; - texture.create(windowSize.x, windowSize.y); - texture.update(*this); - - return texture.copyToImage(); -} - - //////////////////////////////////////////////////////////// void RenderWindow::onCreate() {