Method Line
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Line(InputOutputArray, int, int, int, int, Scalar, int, LineTypes, int)
Draws a line segment connecting two points
public static void Line(InputOutputArray img, int pt1X, int pt1Y, int pt2X, int pt2Y, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgInputOutputArrayThe image.
pt1XintFirst point's x-coordinate of the line segment.
pt1YintFirst point's y-coordinate of the line segment.
pt2XintSecond point's x-coordinate of the line segment.
pt2YintSecond point's y-coordinate of the line segment.
colorScalarLine color.
thicknessintLine thickness. [By default this is 1]
lineTypeLineTypesType of the line. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]
Line(InputOutputArray, Point, Point, Scalar, int, LineTypes, int)
Draws a line segment connecting two points
public static void Line(InputOutputArray img, Point pt1, Point pt2, Scalar color, int thickness = 1, LineTypes lineType = LineTypes.Link8, int shift = 0)
Parameters
imgInputOutputArrayThe image.
pt1PointFirst point of the line segment.
pt2PointSecond point of the line segment.
colorScalarLine color.
thicknessintLine thickness. [By default this is 1]
lineTypeLineTypesType of the line. [By default this is LineType.Link8]
shiftintNumber of fractional bits in the point coordinates. [By default this is 0]