[][src]Struct opencv::viz::WText

pub struct WText { /* fields omitted */ }

This 2D Widget represents text overlay.

Methods

impl WText[src]

pub fn as_raw_WText(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl WText[src]

pub fn new(
    text: &str,
    pos: Point,
    font_size: i32,
    color: &Color
) -> Result<WText>
[src]

Constructs a WText.

Parameters

  • text: Text content of the widget.
  • pos: Position of the text.
  • font_size: Font size.
  • color: Color of the text.

C++ default parameters

  • font_size: 20
  • color: Color::white()

pub fn set_text(&mut self, text: &str) -> Result<()>[src]

Sets the text content of the widget.

Parameters

  • text: Text content of the widget.

pub fn get_text(&self) -> Result<String>[src]

Returns the current text content of the widget.

Trait Implementations

impl WidgetTrait for WText[src]

impl Widget2DTrait for WText[src]

impl Send for WText[src]

impl Drop for WText[src]

Auto Trait Implementations

impl !Sync for WText

impl Unpin for WText

impl UnwindSafe for WText

impl RefUnwindSafe for WText

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]