diff options
Diffstat (limited to 'include/SFML/Graphics/RenderWindow.hpp')
-rw-r--r-- | include/SFML/Graphics/RenderWindow.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 98e5b9a..fc55af4 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) +// Copyright (C) 2007-2016 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. @@ -115,6 +115,17 @@ public: //////////////////////////////////////////////////////////// /// \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 @@ -126,7 +137,7 @@ public: /// \return Image containing the captured contents /// //////////////////////////////////////////////////////////// - Image capture() const; + SFML_DEPRECATED Image capture() const; protected: |