title: How to draw inner stroke with Java2D
body: <p>I just want to draw the circle which is exactly 15x15 pixels sized, and have fill and outline. I'm using Java2D. The problem is, as a result of sequentally called <code>Graphics2D.fill(circle)</code> and <code>Graphics2D.draw(circle)</code> the circle of 16x16 pixels drawn. It is because of internal Java2D outlinig mechanism, which for given 15x15 size provides 16x16 circle outline. Furthermore, if I ask Java2D to draw 14x14 pixels circle outline - it draws exactly 14x14 px. I have tried to play with antialiasing and stroke hints of renderer with no luck.<br/><img src="https://i.stack.imgur.com/i5xtA.png" alt="illustration"> Here are:</p>
  
  <ol>
  <li><code>RenderingHints.VALUE_STROKE_NORMALIZE</code> and <code>Ellipse2D.Double(0, 0, 15, 15)</code> outline</li>
  <li><code>RenderingHints.VALUE_STROKE_PURE</code> and same outline - notice 1px distortion</li>
  <li>previous stroke hint and <code>Ellipse2D.Double(0, 0, 14, 14)</code></li>
  <li><code>RenderingHints.VALUE_STROKE_NORMALIZE</code>, <code>Ellipse2D.Double(0, 0, 15, 15)</code> outline and antialiasing hint</li>
  </ol>
  
  <p>So, I can't draw 15px circle outline (also 13 px, 29 px and any odd size) with Java2D. Is there a way to draw some sort of inner stroke, which fills pixels at inner border of shape?</p>