PolygonMathToIntPoints(IEnumerableValueTupleDouble, Double, Double, Double, Double, Double) Method |
Creates integer polygon points from points consisting of doubles.
The points can be transformed before converting to integers. First, the points are centered (x'=x-centerX, y'=y-centerY). Then the centered point
is rotated. Lastly, the such transformated points is scaled.
Namespace: Altaxo.Geometry.Int64_2DAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static IEnumerable<IntPoint> ToIntPoints(
this IEnumerable<(double X, double Y)> points,
double centerX = 0,
double centerY = 0,
double rotation_rad = 0,
double scale = 1
)
Parameters
- points IEnumerableValueTupleDouble, Double
- The original points.
- centerX Double (Optional)
- The x coordinate of the center. (first transformation x' = x - centerX).
- centerY Double (Optional)
- The y coordinate of the center. (first transformation y' = y - centerY).
- rotation_rad Double (Optional)
- The rotation in rad (second transformation x'' = Cos(phi) * x' - Sin(phi) * y', y'' = Sin(phi) * x' + Cos(phi) * y').
- scale Double (Optional)
- The scale (third transformation x''' = scale * x'', y''' = scale * y'').
Return Value
IEnumerableIntPointThe centered, rotated and scaled points, rounded to integers.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableValueTupleDouble,
Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also