chickadee » sdl2 » render-read-pixels-raw

render-read-pixels-raw renderer rect format pixels-out pitchprocedure

Read the pixels from some or all of the given renderer. This is for advanced users, and must be used with caution. See SDL_RenderReadPixels. This procedure is available in sdl2 egg version 0.2.0 and higher.

  • renderer is the sdl2:renderer to read from.
  • rect is a sdl2:rect specifying the part of the renderer to read, or #f to read the entire renderer.
  • format is a pixel format symbol or equivalent integer, specifying the desired format of the pixel data.
  • pixels-out is a pointer or locative where the pixel data will be written. It must point to a block of memory large enough to hold all the requested pixel data, or your program may crash or other bad things happen.
  • pitch is an integer specifying the pitch of the pixel data.