From bb33cb273dee395711b865190ef82af3a018ebf7 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 26 Dec 2014 21:45:00 +0300 Subject: [PATCH] Fix pitch descriptions --- SDL2pp/Renderer.hh | 3 ++- SDL2pp/Texture.hh | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SDL2pp/Renderer.hh b/SDL2pp/Renderer.hh index 42fa58c..b44736e 100644 --- a/SDL2pp/Renderer.hh +++ b/SDL2pp/Renderer.hh @@ -384,7 +384,8 @@ public: /// use the format of the rendering target /// \param pixels Pointer to memory to be filled with pixel /// data - /// \param pitch Pitch (row width) of the pixels parameter + /// \param pitch Number of bytes in a row of pixel data, including + /// padding between lines /// /// \see http://wiki.libsdl.org/SDL_RenderReadPixels /// diff --git a/SDL2pp/Texture.hh b/SDL2pp/Texture.hh index 475903f..9ab0fb4 100644 --- a/SDL2pp/Texture.hh +++ b/SDL2pp/Texture.hh @@ -93,7 +93,7 @@ public: private: Texture* texture_; ///< SDL2pp::Texture this lock belongs to void* pixels_; ///< Pointer to raw pixel data of locked region - int pitch_; ///< Pitch (row length) of pixel data in bytes + int pitch_; ///< Number of bytes in a row of pixel data, including padding between lines private: //////////////////////////////////////////////////////////// @@ -157,9 +157,10 @@ public: void* GetPixels() const; //////////////////////////////////////////////////////////// - /// \brief Get row width of locked pixel data + /// \brief Get pitch of locked pixel data /// - /// \returns Pitch (row width) of locked pixel data + /// \returns Number of bytes in a row of pixel data, including + /// padding between lines /// //////////////////////////////////////////////////////////// int GetPitch() const; @@ -240,7 +241,7 @@ public: /// \param rect Rect representing the area to update, or NullOpt to /// update the entire texture /// \param pixels Raw pixel data - /// \param pitch Number of bytes in a row of pixel data, including \ + /// \param pitch Number of bytes in a row of pixel data, including /// padding between lines /// /// \see http://wiki.libsdl.org/SDL_UpdateTexture