title: How to turn off anti-aliasing for DrawingBrush?
body: <p>I want to draw a triangle as a border background. One way of doing this is by using a DrawingBrush, but at smaller sizes anti-aliasing is distorting the triangle and making it blurry. <strong>How can I disable anti-aliasing?</strong></p>
  
  <pre><code>&lt;Border&gt;
      &lt;Border.Background&gt;
          &lt;DrawingBrush&gt;
              &lt;DrawingBrush.Drawing&gt;
                  &lt;GeometryDrawing Brush="Red"&gt;
                      &lt;GeometryDrawing.Geometry&gt;
                          &lt;PathGeometry&gt;
                              &lt;PathGeometry.Figures&gt;
                                  &lt;PathFigureCollection&gt;
                                      &lt;PathFigure IsClosed="True" StartPoint="0,3" IsFilled="True"&gt;
                                          &lt;PathFigure.Segments&gt;
                                              &lt;LineSegment Point="3,0" /&gt;
                                              &lt;LineSegment Point="6,3" /&gt;
                                          &lt;/PathFigure.Segments&gt;
                                      &lt;/PathFigure&gt;
                                  &lt;/PathFigureCollection&gt;
                              &lt;/PathGeometry.Figures&gt;
                          &lt;/PathGeometry&gt;
                      &lt;/GeometryDrawing.Geometry&gt;
                  &lt;/GeometryDrawing&gt;
              &lt;/DrawingBrush.Drawing&gt;
          &lt;/DrawingBrush&gt;
      &lt;/Border.Background&gt;
  &lt;/Border&gt;
  </code></pre>
  
  <p>I've tried setting RenderOptions.EdgeMode="Aliased" and SnapsToDevicePixels="true" on all possible elements, but that hasn't worked...</p>
  
  <p><strong>Edit:</strong><br>
  This is what the drawn triangle looks like at Width=17; Height=12 (zoomed to 800%):</p>
  
  <p><img src="https://i.stack.imgur.com/yfF1B.jpg" alt="Blurry triangle"></p>
  
  <p>As you can see the edges are anti-aliased. All the usual options for disabling anti-aliasing don't seem to be working...</p>