| Cv2Line Method (InputOutputArray, Point, Point, Scalar, Int32, LineTypes, Int32) |
Draws a line segment connecting two points
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void Line(
InputOutputArray img,
Point pt1,
Point pt2,
Scalar color,
int thickness = 1,
LineTypes lineType = LineTypes.Link8,
int shift = 0
)
Public Shared Sub Line (
img As InputOutputArray,
pt1 As Point,
pt2 As Point,
color As Scalar,
Optional thickness As Integer = 1,
Optional lineType As LineTypes = LineTypes.Link8,
Optional shift As Integer = 0
)
public:
static void Line(
InputOutputArray^ img,
Point pt1,
Point pt2,
Scalar color,
int thickness = 1,
LineTypes lineType = LineTypes::Link8,
int shift = 0
)
static member Line :
img : InputOutputArray *
pt1 : Point *
pt2 : Point *
color : Scalar *
?thickness : int *
?lineType : LineTypes *
?shift : int
(* Defaults:
let _thickness = defaultArg thickness 1
let _lineType = defaultArg lineType LineTypes.Link8
let _shift = defaultArg shift 0
*)
-> unit
Parameters
- img
- Type: OpenCvSharpInputOutputArray
The image. - pt1
- Type: OpenCvSharpPoint
First point of the line segment. - pt2
- Type: OpenCvSharpPoint
Second point of the line segment. - color
- Type: OpenCvSharpScalar
Line color. - thickness (Optional)
- Type: SystemInt32
Line thickness. [By default this is 1] - lineType (Optional)
- Type: OpenCvSharpLineTypes
Type of the line. [By default this is LineType.Link8] - shift (Optional)
- Type: SystemInt32
Number of fractional bits in the point coordinates. [By default this is 0]
See Also