Skip to content

C#: PointInPolygon with PathD #330

Answered by AngusJohnson
Bolero-fk asked this question in Q&A
Discussion options

You must be logged in to vote
    public static PointInPolygonResult PointInPolygon(PointD pt, 
      PathD polygon, int precision =2)
    {
      InternalClipper.CheckPrecision(precision);
      double scale = Math.Pow(10, precision);
      Point64 p = new Point64(pt, scale);
      Path64 path = ScalePath64(polygon, scale);
      return InternalClipper.PointInPolygon(p, path);
    }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Bolero-fk
Comment options

@AngusJohnson
Comment options

Answer selected by Bolero-fk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants