-- $Date: 2004/01/25 13:55:33 $
-- $Revision: 1.10 $
-- $Author: jcrocholl $

with Real_Vectors; use Real_Vectors;
with Messages; use Messages;
with Outlines; use Outlines;
with Lines; use Lines;
with Straights; use Straights;

package body Stairs is

   -- Remove pixel stairs. This is done by removing all lines with a
   -- length of less than Min_Length, and using their middle point
   -- instead.
   procedure Remove_Stairs
     (This       : access Outline-- Remove stairs from this Outline.
      Min_Length : in Real := 1.5) -- Collapse lines shorter than this.
   is
      use Outlines.Line_Lists;
      Valid_1   : Boolean := False;
      Item_0    : Line_Lists.Item_Access;
      Item_1    : Line_Lists.Item_Access;
      Item_2    : Line_Lists.Item_Access;
      Vector_1  : Vector;
      Vector_2  : Vector;
      Vector_L  : Vector;
      Redundant : Boolean := False;
      Red_First : Boolean := False;