Results 1 to 3 of 3

Thread: FindColorsArray;

  1. #1
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

  2. #2
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function FindColorsArrayTolerance(var ResultTPA: T2DPointArray; var Colors: TIntegerArray; xs, ys, xe, ye, Tol: integer): Boolean;
    var
      i: integer;
     
    begin
      if Length(Colors) = 0 then Exit;
      for i := 0 to Length(Colors) - 1 do
      begin
        FindColorsTolerance(ResultTPA[i], Colors[i], xs, ys, xe, ye, Tol);
        if Length(ResultTPA[i]) = 0 then
          Result := False;
      end;
    end;

    Thats not working
    A boolean will only result true once you set it to true!
    It starts as false..
    So I think you ment:
    SCAR Code:
    function FindColorsArrayTolerance(var ResultTPA: T2DPointArray; var Colors: TIntegerArray; xs, ys, xe, ye, Tol: integer): Boolean;
    var
      i: integer;
     
    begin
      if Length(Colors) = 0 then Exit;
      for i := 0 to Length(Colors) - 1 do
      begin
        FindColorsTolerance(ResultTPA[i], Colors[i], xs, ys, xe, ye, Tol);
        if not Length(ResultTPA[i]) = 0 then
          Result := True;
      end;
    end;

    And please...
    Stop making all those treads of new functions
    It is good that you contribute to the comminuty, but why don't you make 1 tread with all of them.. added in coloms:
    Core
    Misc
    Etc

    PvH

  3. #3
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no pvh theres nowt wrong with them seperate thread titles and you dont have to double post and bump a dead thread when he release a new one

    wd
    Blank!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •