Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28

Thread: PercentBlackMM

  1. #26
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    That's weird, because it worked perfectly with 65536, not sure why it doesn't like other colours.

    I'm looking into it and seeing what's wrong.

  2. #27
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    SCAR Code:
    function PercentColorMMEx(Color, Tol, StartRadial, EndRadial, StartRadius, EndRadius: Integer): integer;
    var
      TPA: TPointArray;
    begin
      FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, Tol);
      FilterPointsPie(TPA, StartRadial, EndRadial, StartRadius, EndRadius, MMCX, MMCY);
      Result := Round((Length(TPA) * 100) / ((Pi * (EndRadius * EndRadius)) * ((EndRadial - StartRadial) / 360.0)-((Pi * (StartRadius * StartRadius)) * ((EndRadial - StartRadial) / 360.0))));
    end;

    Fixed, and if anyone would be in need of a simpler version:

    SCAR Code:
    function PercentColorMM(Color, Tol): Integer;
    begin
      Result := PercentColorMMEx(Color, Tol, 0, 360, 0, 76);
    end;

  3. #28
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Ok committed.

Page 2 of 2 FirstFirst 12

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
  •