class cv::viz::WText

Overview

Text and image widgets. Moreā€¦

#include <widgets.hpp>

class WText: public cv::viz::Widget2D
{
public:
    // construction

    WText(
        const String& text,
        const Point& pos,
        int font_size = 20,
        const Color& color = Color::white()
        );

    // methods

    String
    getText() const;

    void
    setText(const String& text);
};

Inherited Members

public:
    // methods

    template <typename _W>
    _W
    cast();

    Widget2D
    cast();

    WWidgetMerger
    cast();

    double
    getRenderingProperty(int property) const;

    Widget&
    operator=(const Widget& other);

    void
    setRenderingProperty(
        int property,
        double value
        );

    static
    Widget
    fromPlyFile(const String& file_name);

    void
    setColor(const Color& color);

Detailed Documentation

Text and image widgets.

This 2D Widget represents text overlay.

Construction

WText(
    const String& text,
    const Point& pos,
    int font_size = 20,
    const Color& color = Color::white()
    )

Constructs a WText.

Parameters:

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

Methods

String
getText() const

Returns the current text content of the widget.

void
setText(const String& text)

Sets the text content of the widget.

Parameters:

text Text content of the widget.