#[repr(C)]pub struct Line {
pub pt1: Point,
pub pt2: Point,
pub color: Scalar,
pub thick: i32,
pub lt: i32,
pub shift: i32,
}Expand description
This structure represents a line to draw.
Parameters match cv::line().
Fields§
§pt1: PointThe first point of the line segment
pt2: PointThe second point of the line segment
color: ScalarThe line color
thick: i32The thickness of line
lt: i32The Type of the line. See #LineTypes
shift: i32The number of fractional bits in the point coordinates
Implementations§
Source§impl Line
impl Line
Sourcepub fn new(
pt1_: Point,
pt2_: Point,
color_: Scalar,
thick_: i32,
lt_: i32,
shift_: i32,
) -> Result<Line>
pub fn new( pt1_: Point, pt2_: Point, color_: Scalar, thick_: i32, lt_: i32, shift_: i32, ) -> Result<Line>
Line constructor
§Parameters
- pt1_: The first point of the line segment
- pt2_: The second point of the line segment
- color_: The line color
- thick_: The thickness of line
- lt_: The Type of the line. See [line_types]
- shift_: The number of fractional bits in the point coordinates
§C++ default parameters
- thick_: 1
- lt_: 8
- shift_: 0
Sourcepub fn new_def(pt1_: Point, pt2_: Point, color_: Scalar) -> Result<Line>
pub fn new_def(pt1_: Point, pt2_: Point, color_: Scalar) -> Result<Line>
Line constructor
§Parameters
- pt1_: The first point of the line segment
- pt2_: The second point of the line segment
- color_: The line color
- thick_: The thickness of line
- lt_: The Type of the line. See [line_types]
- shift_: The number of fractional bits in the point coordinates
§Note
This alternative version of [new] function uses the following default values for its arguments:
- thick_: 1
- lt_: 8
- shift_: 0
pub fn default() -> Line
Trait Implementations§
impl Copy for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more