title: Cannot draw a filled circle with SDL2 gfx
body: <p>There is the following code. The desired result is that a window is created and a filled circle is drawn:</p>
  
  <pre><code>#include &lt;SDL2/SDL.h&gt;
  #include &lt;iostream&gt;
  #include &lt;SDL2/SDL2_gfxPrimitives.h&gt;
  
  int main()
  {
     SDL_Window* window = nullptr;
     SDL_Renderer* renderer = nullptr;
  
     if(SDL_Init(SDL_INIT_EVERYTHING) &lt; 0)
     {
        std::cout &lt;&lt; "Could not initialise" &lt;&lt; std::endl;
        return 1;
     }
  
     window = SDL_CreateWindow("MyGame",
                               SDL_WINDOWPOS_UNDEFINED,
                               SDL_WINDOWPOS_UNDEFINED,
                               640,
                               480,
                               SDL_WINDOW_SHOWN);
     if(!window)
     {
        std::cout &lt;&lt; "Could not create the window" &lt;&lt; std::endl;
        return 1;
     }
  
     renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
     SDL_RenderClear(renderer);
  
     Sint16 circleR = 100;
     Sint16 circleX = 300;
     Sint16 circleY = 300;
     SDL_Surface* windowSurface = SDL_GetWindowSurface(window);
     Uint32 circleColour = SDL_MapRGB(windowSurface-&gt;format, 255, 0, 0);
  
     int result = filledCircleColor(renderer, circleX, circleY, circleR, circleColour);
  
     std::cout &lt;&lt; "drawing the circle r " &lt;&lt; circleR &lt;&lt; " x " &lt;&lt; circleX &lt;&lt; " y " &lt;&lt; circleY &lt;&lt; " circleColour " &lt;&lt; circleColour &lt;&lt; std::endl;
     std::cout &lt;&lt; "draw circle result " &lt;&lt; result &lt;&lt; std::endl;
  
     SDL_RenderPresent(renderer);
  
     bool run = true;
     while(run)
     {
        SDL_Event event;
        while (SDL_PollEvent(&amp;event))
        {
           if(event.type == SDL_QUIT)
           {
              run = false;
           }
        }
  
     }
  
     SDL_Quit();
     return 0;
  }
  </code></pre>
  
  <p>The problem is that the circle is not drawn - the window is all black. </p>
  
  <p>The output:</p>
  
  <pre><code>drawing the circle r 100 x 300 y 300 circleColour 16711680
  draw circle result 0
  </code></pre>
  
  <p><code>filledCircleColor</code> returns 0 what should mean that there's no error.</p>
  
  <p>What should be done so that the circle is drawn? I'm using SDL 2.0.2 on Ubuntu with SDL2 gfx extension.</p>