include/SDL_video.h
changeset 3435 9f62f47d989b
parent 3407 d3baf5ac4e37
child 3492 7a606cfa5c2d
equal deleted inserted replaced
3434:147d6ef5be03 3435:9f62f47d989b
  1171 /**
  1171 /**
  1172  *  \brief Read pixels from the current rendering target.
  1172  *  \brief Read pixels from the current rendering target.
  1173  *  
  1173  *  
  1174  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
  1174  *  \param rect   A pointer to the rectangle to read, or NULL for the entire 
  1175  *                render target.
  1175  *                render target.
  1176  *  \param pixels A pointer to be filled in with the pixel data in the rendering
  1176  *  \param format The desired format of the pixel data, or 0 to use the format
  1177  *                target format.
  1177  *                of the rendering target
       
  1178  *  \param pixels A pointer to be filled in with the pixel data
  1178  *  \param pitch  The pitch of the pixels parameter.
  1179  *  \param pitch  The pitch of the pixels parameter.
  1179  *  
  1180  *  
  1180  *  \return 0 on success, or -1 if pixel reading is not supported.
  1181  *  \return 0 on success, or -1 if pixel reading is not supported.
  1181  *  
  1182  *  
  1182  *  \warning This is a very slow operation, and should not be used frequently.
  1183  *  \warning This is a very slow operation, and should not be used frequently.
  1183  */
  1184  */
  1184 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
  1185 extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
       
  1186                                                  Uint32 format,
  1185                                                  void *pixels, int pitch);
  1187                                                  void *pixels, int pitch);
  1186 
  1188 
  1187 /**
  1189 /**
  1188  *  \brief Write pixels to the current rendering target.
  1190  *  \brief Write pixels to the current rendering target.
  1189  *  
  1191  *  
  1190  *  \param rect   A pointer to the rectangle to write, or NULL for the entire 
  1192  *  \param rect   A pointer to the rectangle to write, or NULL for the entire 
  1191  *                render target.
  1193  *                render target.
       
  1194  *  \param format The format of the pixel data, or 0 to use the format
       
  1195  *                of the rendering target
  1192  *  \param pixels A pointer to the pixel data to write.
  1196  *  \param pixels A pointer to the pixel data to write.
  1193  *  \param pitch  The pitch of the pixels parameter.
  1197  *  \param pitch  The pitch of the pixels parameter.
  1194  *  
  1198  *  
  1195  *  \return 0 on success, or -1 if pixel writing is not supported.
  1199  *  \return 0 on success, or -1 if pixel writing is not supported.
  1196  *  
  1200  *  
  1197  *  \warning This is a very slow operation, and should not be used frequently.
  1201  *  \warning This is a very slow operation, and should not be used frequently.
  1198  */
  1202  */
  1199 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
  1203 extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
       
  1204                                                   Uint32 format,
  1200                                                   const void *pixels,
  1205                                                   const void *pixels,
  1201                                                   int pitch);
  1206                                                   int pitch);
  1202 
  1207 
  1203 /**
  1208 /**
  1204  *  \brief Update the screen with rendering performed.
  1209  *  \brief Update the screen with rendering performed.