title: Get a list of coordinates from System.Windows.Media.Geometry
body: <p>Given a <code>System.Windows.Media.Geometry</code> class instance, is there an easy way to convert this to a list of outlines and points? For example, how could I simply break this down into a list of <code>LineSegments</code> for custom rendering.</p>
  
  <pre><code>FormattedText formattedText = new FormattedText( "Hello", ...);
  Geometry textGeometry = formattedText.BuildGeometry(new System.Windows.Point(0, 0));
  </code></pre>
  
  <p>How to list each of the outlines (where O would be an inside/outside circle) and each of the points on each outline?</p>
  
  <p>As per the answer below;</p>
  
  <pre><code>    var flatten = textGeometry.GetFlattenedPathGeometry();
      PathFigureCollection pfc = flatten.Figures;
  
      foreach (PathFigure pf in pfc)
       {
          foreach (PathSegment ps in pf.Segments)
           {
              if (ps is LineSegment)
  </code></pre>