anchor.diff:  	    triangle_ls_lp(SLSs, LSs2, Out)
       end;
   triangle_ls_lp([LS1|LSs1],P1,[LS2|LSs2],P2, Out) ->
  -    {Y, Xl1, Xr1} = LS1,
  -    {_, Xl2, Xr2} = LS2,
  +    {Y, Xl1, Xr1,_Ca1} = LS1,
  +    {_, Xl2, Xr2,_Ca2} = LS2,
       Xr = lists:max([Xl1,Xr1,Xl2,Xr2]),
       Xl = lists:min([Xl1,Xr1,Xl2,Xr2]),
  -    triangle_ls_lp(LSs1,P1, LSs2, P2, [{Y,Xl,Xr}|Out]).    
  +    triangle_ls_lp(LSs1,P1,LSs2,P2,[{Y,Xl,Xr}|Out]).
   
   triangle_ls_lp([],[],Out) -> Out;
   triangle_ls_lp([],_,Out) -> Out;
   triangle_ls_lp(_,[],Out) -> Out;
   triangle_ls_lp([LS1|LSs1], [LS2|LSs2], Out) ->
  -    {Y, Xl1, Xr1} = LS1,
  -    {_, Xl2, Xr2} = LS2,
  +    {Y, Xl1, Xr1, _Ca1} = LS1,
  +    {_, Xl2, Xr2, _Ca2} = LS2,
       Xr = lists:max([Xl1,Xr1,Xl2,Xr2]),
       Xl = lists:min([Xl1,Xr1,Xl2,Xr2]),
  -    triangle_ls_lp(LSs1, LSs2, [{Y,Xl,Xr}|Out]).    
  +    triangle_ls_lp(LSs1,LSs2,[{Y,Xl,Xr}|Out]).
          
   tri_pt_ysort(Pts) ->
       % {X,Y}
  
positive.code: -compile(inline).
  
  -export([line_to_linespans/3]).
  -export([line_ls/2]).
  
  -include("egd.hrl").
  -define('DummyC',0).
  
negative.code: line_to_ls_sx_do(X0,Y0,X1,Y1,Dx,Dy,Sx,Sy,E,Ed,Wd,Ls0,E2,Y) when E2 < Ed*Wd andalso
                                                                  (Y1 =/= Y orelse Dx > Dy) ->
      Y2 = Y + Sy,
      C = max(0,255*(abs(E2)/Ed-Wd+1)),
      Ls = [{Y2,X0,X0,C}|Ls0],
      line_to_ls_sx_do(X0,Y0,X1,Y1,Dx,Dy,Sx,Sy,E,Ed,Wd,Ls,E2+Dx,Y2);
  line_to_ls_sx_do(X0,_Y0,X1,_Y1,_Dx,_Dy,_Sx,_Sy,_E,_Ed,_Wd,Ls,_E2,_Y) when X0 =:= X1 ->
      Ls;
  