title: Pygame draw behavior
body: <p>I am currently designing basic <strong>pygame</strong> projects. Random projects actually, which are just random ideas pop into my head during common daytime. One of them is a wall clock. Where I use <code>sin</code>, <code>cos</code> functions to draw hour hand, minute hand etc..</p>
  
  <p>As a result of these functions, I obtain float values. Which pygame does not allow. So I <code>round</code> and <code>int()</code> all values before using them in drawing functions. This makes sense because of pixels can't be partially filled. However, I think this results in bad drawings.</p>
  
  <p><a href="https://i.stack.imgur.com/2h1VV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2h1VV.jpg" alt="pygame clock"></a></p>
  
  <p>The Image above is the clock drawn by the pygame module. As you see the handles are somewhat leaning. Not straight.</p>
  
  <p>I also implemented this in <a href="http://www.codeskulptor.org" rel="nofollow noreferrer">codeskulptor</a>. Which is a python2 environment for basic game(or any graphical) programming. Has nice and clear functions, very easy to use indeed. The float values I use in that no needs conversion and accepted directly. I do not know how it handles it, but it is clearly better. Obviously not just rounding and integering(does this word exist ?) values. Let me show you the clock drawn in codeskuptor:</p>
  
  <p><a href="https://i.stack.imgur.com/36wnn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/36wnn.jpg" alt="codeskuptor clock"></a></p>
  
  <p>As you can see, the edges are more smooth. The lines does not end sloped, but straight. It is clearly a better drawing than the pygame one.</p>
  
  <p><strong>But</strong> the thing is, codeskuptor does not implement many modules and built-in functions that is harder than beginning level knowledge. Also it doesn't support a well-known compiler(basically not a python module). So can't work on computer and can not be compiled with py2exe, pyinstaller as such.</p>
  
  <p><strong>So</strong> I wan't to implement all this in pygame, and get smooth results just like in codeskulptor. Maybe a better way to handle float points for drawing. Any idea or knowledge in this area would be greatly appreciated.</p>
  
  <p><a href="http://www.codeskulptor.org/#user41_CZXYTyLLrW_5.py" rel="nofollow noreferrer">My code for codeskuptor(Does not show realtime)</a></p>
  
  <p><a href="https://justpaste.it/r971" rel="nofollow noreferrer">My code for pygame</a></p>
  
  <p>The codes does not supply proper commenting because they were just a late-night fun nothing more. I'll explain any necessary parts.</p>