Struct opencv::gapi::Text

source ·
pub struct Text { /* private fields */ }
Expand description
  • This structure represents a text string to draw.
  • Parameters match cv::putText().

Implementations§

source§

impl Text

source

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
source

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
source

pub fn default() -> Text

Trait Implementations§

source§

impl Boxed for Text

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Clone for Text

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Text

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Text

source§

fn default() -> Self

Forwards to infallible Self::default()

source§

impl Drop for Text

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl TextTrait for Text

source§

fn as_raw_mut_Text(&mut self) -> *mut c_void

source§

fn set_text(&mut self, val: &str)

The text string to be drawn
source§

fn set_org(&mut self, val: Point)

The bottom-left corner of the text string in the image
source§

fn set_ff(&mut self, val: i32)

The font type, see #HersheyFonts
source§

fn set_fs(&mut self, val: f64)

The font scale factor that is multiplied by the font-specific base size
source§

fn set_color(&mut self, val: Scalar)

The text color
source§

fn set_thick(&mut self, val: i32)

The thickness of the lines used to draw a text
source§

fn set_lt(&mut self, val: i32)

The line type. See #LineTypes
source§

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

source§

fn as_raw_Text(&self) -> *const c_void

source§

fn text(&self) -> String

The text string to be drawn
source§

fn org(&self) -> Point

The bottom-left corner of the text string in the image
source§

fn ff(&self) -> i32

The font type, see #HersheyFonts
source§

fn fs(&self) -> f64

The font scale factor that is multiplied by the font-specific base size
source§

fn color(&self) -> Scalar

The text color
source§

fn thick(&self) -> i32

The thickness of the lines used to draw a text
source§

fn lt(&self) -> i32

The line type. See #LineTypes
source§

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
source§

impl Send for Text

Auto Trait Implementations§

§

impl RefUnwindSafe for Text

§

impl !Sync for Text

§

impl Unpin for Text

§

impl UnwindSafe for Text

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.