anchor.diff: -{$mode delphi}
  +{$i xpc.inc}{$mode delphi}
   unit uww;
  -interface uses classes, ugeom2d;
  +interface uses xpc, classes, ugeom2d, cw{for debug};
   
   type
     TWordWrap = class (TComponent)
       private
  +      _gw,                 // gap width (space between items)
         _cx, _cy,            // current x, y
         _ww, _lh : cardinal; // wrap width and line height
       published
         constructor create(aOwner : TComponent); override;
         procedure reset;
         procedure place(item : ugeom2d.IBounds2D);
  +      procedure debugdraw;
         property width : cardinal read _ww write _ww;
       end;
   
  
positive.code:   end;
  
  procedure TWordWrap.Place(item : ugeom2d.IBounds2D);
    begin //  prove this word wrap algorithm works
      { wrap when item is wider than the distance to the edge. }
      if (item.w > _ww - _cx) then
        begin
  	if (_cx<>0) then _cy += _lh;
  	_cx := 0; item.x := 0; item.y := _cy;
        end
      else
        begin
  	item.x := _cx; _cx += item.w;
        end
    end;
  
  initialization
  
negative.code: constructor TWordWrap.Create(aOwner : TComponent);
    begin
      inherited create(aOwner);
      _cx := 0; _cy := 0; _ww := 64; _lh := 1; _gw := 1;
    end;
  
  procedure TWordWrap.Reset;
  