MCPcopy Create free account
hub / github.com/AngusJohnson/Clipper2 / ScalePath

Method ScalePath

CSharp/Clipper2Lib/Clipper.cs:385–397  ·  view source on GitHub ↗
(Path64 path, double scale)

Source from the content-addressed store, hash-verified

383 }
384
385 public static Path64 ScalePath(Path64 path, double scale)
386 {
387 if (InternalClipper.IsAlmostZero(scale - 1)) return path;
388 Path64 result = new Path64(path.Count);
389#if USINGZ
390 foreach (Point64 pt in path)
391 result.Add(new Point64(pt.X * scale, pt.Y * scale, pt.Z));
392#else
393 foreach (Point64 pt in path)
394 result.Add(new Point64(pt.X * scale, pt.Y * scale));
395#endif
396 return result;
397 }
398
399 public static Paths64 ScalePaths(Paths64 paths, double scale)
400 {

Callers

nothing calls this directly

Calls 2

IsAlmostZeroMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected