[−][src]Function opencv::highgui::font_qt
pub fn font_qt(
name_font: &str,
point_size: i32,
color: Scalar,
weight: i32,
style: i32,
spacing: i32
) -> Result<QtFont>
Creates the font to draw a text on an image.
The function fontQt creates a cv::QtFont object. This cv::QtFont is not compatible with putText .
A basic usage of this function is the following: :
ⓘ
QtFont font = fontQt("Times"); addText( img1, "Hello World !", Point(50,50), font);
Parameters
- nameFont: Name of the font. The name should match the name of a system font (such as Times). If the font is not found, a default one is used.
- pointSize: Size of the font. If not specified, equal zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points.
- color: Color of the font in BGRA where A = 255 is fully transparent. Use the macro CV_RGB for simplicity.
- weight: Font weight. Available operation flags are : cv::QtFontWeights You can also specify a positive integer for better control.
- style: Font style. Available operation flags are : cv::QtFontStyles
- spacing: Spacing between characters. It can be negative or positive.
C++ default parameters
- point_size: -1
- color: Scalar::all(0)
- weight: QT_FONT_NORMAL
- style: QT_STYLE_NORMAL
- spacing: 0