pub struct Text { /* private fields */ }
Expand description
- This structure represents a text string to draw.
- Parameters match cv::putText().
Implementations§
source§impl Text
impl Text
sourcepub fn new(
text_: &str,
org_: Point,
ff_: i32,
fs_: f64,
color_: Scalar,
thick_: i32,
lt_: i32,
bottom_left_origin_: bool
) -> Result<Text>
pub fn new( text_: &str, org_: Point, ff_: i32, fs_: f64, color_: Scalar, thick_: i32, lt_: i32, bottom_left_origin_: bool ) -> Result<Text>
Text constructor
Parameters
- text_: The text string to be drawn
- org_: The bottom-left corner of the text string in the image
- ff_: The font type, see [hershey_fonts]
- fs_: The font scale factor that is multiplied by the font-specific base size
- color_: The text color
- thick_: The thickness of the lines used to draw a text
- lt_: The line type. See [line_types]
- bottom_left_origin_: When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner
C++ default parameters
- thick_: 1
- lt_: 8
- bottom_left_origin_: false
sourcepub fn new_def(
text_: &str,
org_: Point,
ff_: i32,
fs_: f64,
color_: Scalar
) -> Result<Text>
pub fn new_def( text_: &str, org_: Point, ff_: i32, fs_: f64, color_: Scalar ) -> Result<Text>
Text constructor
Parameters
- text_: The text string to be drawn
- org_: The bottom-left corner of the text string in the image
- ff_: The font type, see [hershey_fonts]
- fs_: The font scale factor that is multiplied by the font-specific base size
- color_: The text color
- thick_: The thickness of the lines used to draw a text
- lt_: The line type. See [line_types]
- bottom_left_origin_: When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner
Note
This alternative version of [new] function uses the following default values for its arguments:
- thick_: 1
- lt_: 8
- bottom_left_origin_: false
pub fn default() -> Text
Trait Implementations§
source§impl Boxed for Text
impl Boxed for Text
source§impl TextTrait for Text
impl TextTrait for Text
fn as_raw_mut_Text(&mut self) -> *mut c_void
source§fn set_fs(&mut self, val: f64)
fn set_fs(&mut self, val: f64)
The font scale factor that is multiplied by the font-specific base size
source§fn set_bottom_left_origin(&mut self, val: bool)
fn set_bottom_left_origin(&mut self, val: bool)
When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner
source§impl TextTraitConst for Text
impl TextTraitConst for Text
fn as_raw_Text(&self) -> *const c_void
source§fn bottom_left_origin(&self) -> bool
fn bottom_left_origin(&self) -> bool
When true, the image data origin is at the bottom-left corner. Otherwise, it is at the top-left corner
impl Send for Text
Auto Trait Implementations§
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